Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ private boolean layoutUsesAutoCaps(final String layoutSetName) {
case SubtypeLocaleUtils.LAYOUT_ERGOL:
case SubtypeLocaleUtils.LAYOUT_FARSI:
case SubtypeLocaleUtils.LAYOUT_GEORGIAN:
case SubtypeLocaleUtils.LAYOUT_HCESAR:

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why no autocapitalization?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add that?

case SubtypeLocaleUtils.LAYOUT_HEBREW:
case SubtypeLocaleUtils.LAYOUT_HINDI:
case SubtypeLocaleUtils.LAYOUT_HINDI_COMPACT:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,7 @@ public static List<String> getSupportedLocales() {
public static final String LAYOUT_FARSI = "farsi";
public static final String LAYOUT_GEORGIAN = "georgian";
public static final String LAYOUT_GREEK = "greek";
public static final String LAYOUT_HCESAR = "hcesar";
public static final String LAYOUT_HEBREW = "hebrew";
public static final String LAYOUT_HINDI = "hindi";
public static final String LAYOUT_HINDI_COMPACT = "hindi_compact";
Expand Down Expand Up @@ -387,6 +388,7 @@ public List<Subtype> getSubtypes() {
case LOCALE_POLISH:
case LOCALE_PORTUGUESE_BRAZIL:
case LOCALE_PORTUGUESE_PORTUGAL:
addLayout(LAYOUT_HCESAR);

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hcesar is added to all languages above

case LOCALE_ROMANIAN:
case LOCALE_SLOVAK:
case LOCALE_SWAHILI:
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,8 @@
<string name="subtype_akkhor">Akkhor</string>
<!-- Description for Ergo-L keyboard layout. -->
<string name="subtype_ergol">Ergo-L</string>
<!-- Description for Hcesar keyboard layout. -->
<string name="subtype_hcesar">Hcesar</string>

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason Hcesar layout is not shown in the layout list in Portuguese language settings.


<string name="keyboard_theme_dark_border" translatable="false">Material Dark Border</string>
<string name="keyboard_theme_light_border" translatable="false">Material Light Border</string>
Expand Down
60 changes: 60 additions & 0 deletions app/src/main/res/xml-sw600dp/rows_hcesar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->

<merge
xmlns:latin="http://schemas.android.com/apk/res-auto"
>
<include
latin:keyboardLayout="@xml/key_styles_common" />
<Row
latin:keyWidth="9.0%p"
>
<include
latin:keyboardLayout="@xml/rowkeys_hcesar1" />
<Key
latin:keyStyle="deleteKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
latin:keyWidth="9.0%p"
>
<include
latin:keyboardLayout="@xml/rowkeys_hcesar2" />
<Key
latin:keyStyle="enterKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<Row
latin:keyWidth="9.0%p"
>
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="10.0%p" />
<include
latin:keyboardLayout="@xml/rowkeys_hcesar3" />
<Key
latin:keyStyle="shiftKeyStyle"
latin:keyWidth="fillRight" />
</Row>
<!-- Dvorak layout shares almost the same row with Qwerty layout.
The difference is defined in xml-sw600dp/row_qwerty4.xml. -->
<include
latin:keyboardLayout="@xml/row_qwerty4" />
</merge>
36 changes: 36 additions & 0 deletions app/src/main/res/xml/kbd_hcesar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->

<switch xmlns:latin="http://schemas.android.com/apk/res-auto">
<case latin:showNumberRow="true">
<Keyboard
latin:verticalGap="@fraction/config_key_vertical_gap_5row"
latin:bonusHeight="@fraction/config_key_bonus_height_5row"
latin:rowHeight="20%p">
<include latin:keyboardLayout="@xml/row_qwerty0" />
<include latin:keyboardLayout="@xml/rows_hcesar" />
</Keyboard>
</case>
<default>
<Keyboard>
<include latin:keyboardLayout="@xml/rows_hcesar" />
</Keyboard>
</default>
</switch>
41 changes: 41 additions & 0 deletions app/src/main/res/xml/keyboard_layout_set_hcesar.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->

<KeyboardLayoutSet
xmlns:latin="http://schemas.android.com/apk/res-auto">
<Element
latin:elementName="alphabet"
latin:elementKeyboard="@xml/kbd_hcesar" />
<Element
latin:elementName="symbols"
latin:elementKeyboard="@xml/kbd_symbols" />
<Element
latin:elementName="symbolsShifted"
latin:elementKeyboard="@xml/kbd_symbols_shift" />
<Element
latin:elementName="phone"
latin:elementKeyboard="@xml/kbd_phone" />
<Element
latin:elementName="phoneSymbols"
latin:elementKeyboard="@xml/kbd_phone_symbols" />
<Element
latin:elementName="number"
latin:elementKeyboard="@xml/kbd_number" />
</KeyboardLayoutSet>
160 changes: 160 additions & 0 deletions app/src/main/res/xml/rowkeys_hcesar1.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,160 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
/*
**
** Copyright 2012, The Android Open Source Project
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this file except in compliance with the License.
** You may obtain a copy of the License at
**
** http://www.apache.org/licenses/LICENSE-2.0
**
** Unless required by applicable law or agreed to in writing, software
** distributed under the License is distributed on an "AS IS" BASIS,
** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
** See the License for the specific language governing permissions and
** limitations under the License.
*/
-->

<merge
xmlns:latin="http://schemas.android.com/apk/res-auto"
>
<include
latin:keyboardLayout="@xml/keys_dvorak_123" />
<switch>
<case
latin:showNumberRow="true"
latin:showExtraChars="true">
<Key
latin:keySpec="h"
latin:keyHintLabel="_"
latin:additionalMoreKeys="_"
latin:moreKeys="!text/morekeys_h" />
<Key
latin:keySpec="c"
latin:keyHintLabel="\\"
latin:additionalMoreKeys="\\\\"
latin:moreKeys="!text/morekeys_c" />
<Key
latin:keySpec="e"
latin:keyHintLabel="|"
latin:additionalMoreKeys="\\|"
latin:moreKeys="!text/morekeys_e" />
<Key
latin:keySpec="s"
latin:keyHintLabel="="
latin:additionalMoreKeys="=" />
<Key
latin:keySpec="a"
latin:keyHintLabel="["
latin:additionalMoreKeys="!text/keyspec_left_square_bracket"
latin:moreKeys="!text/morekeys_a" />
<Key
latin:keySpec="r"
latin:keyHintLabel="]"
latin:additionalMoreKeys="!text/keyspec_right_square_bracket" />
<Key
latin:keySpec="o"
latin:keyHintLabel="&lt;"
latin:additionalMoreKeys="!text/keyspec_less_than"
latin:moreKeys="!text/morekeys_o" />
<Key
latin:keySpec="p"
latin:keyHintLabel="&gt;"
latin:additionalMoreKeys="!text/keyspec_greater_than"
latin:moreKeys="!text/morekeys_p" />

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When keyboard opens I get an exception java.lang.RuntimeException: Unknown text name=morekeys_p

<Key
latin:keySpec="z"
latin:keyHintLabel="{"
latin:additionalMoreKeys="!text/keyspec_left_curly_bracket"
latin:moreKeys="!text/morekeys_z" />
<Key
latin:keySpec=","
latin:keyHintLabel="}"
latin:additionalMoreKeys="!text/keyspec_right_curly_bracket"
latin:moreKeys="!text/morekeys_," />
</case>
<case latin:showNumberRow="true">
<Key
latin:keySpec="h"
latin:moreKeys="!text/morekeys_h" />
<Key
latin:keySpec="c"
latin:moreKeys="!text/morekeys_c" />
<Key
latin:keySpec="e"
latin:moreKeys="!text/morekeys_e" />
<Key
latin:keySpec="s" />
<Key
latin:keySpec="a"
latin:moreKeys="!text/morekeys_a" />
<Key
latin:keySpec="r" />
<Key
latin:keySpec="o"
latin:moreKeys="!text/morekeys_o" />
<Key
latin:keySpec="p"
latin:moreKeys="!text/morekeys_p" />
<Key
latin:keySpec="z"
latin:moreKeys="!text/morekeys_z" />
<Key
latin:keySpec=","
latin:moreKeys="!text/morekeys_," />
</case>
<default>
<Key
latin:keySpec="h"
latin:keyHintLabel="1"
latin:additionalMoreKeys="1"
latin:moreKeys="!text/morekeys_h" />
<Key
latin:keySpec="c"
latin:keyHintLabel="2"
latin:additionalMoreKeys="2"
latin:moreKeys="!text/morekeys_c" />
<Key
latin:keySpec="e"
latin:keyHintLabel="3"
latin:additionalMoreKeys="3"
latin:moreKeys="!text/morekeys_e" />
<Key
latin:keySpec="s"
latin:keyHintLabel="4"
latin:additionalMoreKeys="4" />
<Key
latin:keySpec="a"
latin:keyHintLabel="5"
latin:additionalMoreKeys="5"
latin:moreKeys="!text/morekeys_a" />
<Key
latin:keySpec="r"
latin:keyHintLabel="6"
latin:additionalMoreKeys="6" />
<Key
latin:keySpec="o"
latin:keyHintLabel="7"
latin:additionalMoreKeys="7"
latin:moreKeys="!text/morekeys_o" />
<Key
latin:keySpec="p"
latin:keyHintLabel="8"
latin:additionalMoreKeys="8"
latin:moreKeys="!text/morekeys_p" />
<Key
latin:keySpec="z"
latin:keyHintLabel="9"
latin:additionalMoreKeys="9"
latin:moreKeys="!text/morekeys_z" />
<Key
latin:keySpec=","
latin:keyHintLabel="0"
latin:additionalMoreKeys="0"
latin:moreKeys="!text/morekeys_," />
</default>
</switch>
</merge>
Loading