Skip to content

Commit

Permalink
Add page_up, page_down, home, end to extra keys
Browse files Browse the repository at this point in the history
The new keys are placed on the corner of the arrow keys. Key
descriptions are added.

They are removed from the Fn layer to avoid showing up twice.
  • Loading branch information
Julow committed Oct 20, 2023
1 parent 5b43450 commit 33653a9
Show file tree
Hide file tree
Showing 19 changed files with 77 additions and 1 deletion.
4 changes: 4 additions & 0 deletions res/values-cs/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<string name="key_descr_º">Indikátor řadové číslovky</string>
<string name="key_descr_superscript">Horní index</string>
<string name="key_descr_subscript">Dolní index</string>
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Pokročilé</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-de/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<string name="key_descr_º">Ordinalzeichen</string>
<string name="key_descr_superscript">Hochgestellt</string>
<string name="key_descr_subscript">Tiefgestellt</string>
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Erweitert</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Avanzado</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-fa/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">پیشرفته</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-fr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Avancé</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-it/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<!-- <string name="pref_category_advanced">Advanced</string> -->
</resources>
4 changes: 4 additions & 0 deletions res/values-ko/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<!-- <string name="pref_category_advanced">Advanced</string> -->
</resources>
4 changes: 4 additions & 0 deletions res/values-lv/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -99,5 +99,9 @@
<string name="key_descr_º">Kārtas rādītājs</string>
<string name="key_descr_superscript">Augšraksts</string>
<string name="key_descr_subscript">Apakšraksts</string>
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Papildu</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-pl/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<string name="key_descr_º">Wskaźnik porządkowy (męski)</string>
<string name="key_descr_superscript">Indeks górny</string>
<string name="key_descr_subscript">Indeks dolny</string>
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Zaawansowane</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-pt/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<string name="key_descr_º">Indicador Ordinal</string>
<string name="key_descr_superscript">Sobrescrito</string>
<string name="key_descr_subscript">Subscrito</string>
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Avançado</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-ro/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Setări avansate</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-ru/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Расширенные настройки</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-tr/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<!-- <string name="pref_category_advanced">Advanced</string> -->
</resources>
4 changes: 4 additions & 0 deletions res/values-vi/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">Nâng cao</string>
</resources>
4 changes: 4 additions & 0 deletions res/values-zh-rCN/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,5 +97,9 @@
<!-- <string name="key_descr_º">Ordinal Indicator</string> -->
<!-- <string name="key_descr_superscript">Superscript</string> -->
<!-- <string name="key_descr_subscript">Subscript</string> -->
<!-- <string name="key_descr_page_up">Page Up</string> -->
<!-- <string name="key_descr_page_down">Page Down</string> -->
<!-- <string name="key_descr_home">Home</string> -->
<!-- <string name="key_descr_end">End</string> -->
<string name="pref_category_advanced">高级设置</string>
</resources>
4 changes: 4 additions & 0 deletions res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,10 @@
<string name="key_descr_º">Ordinal Indicator</string>
<string name="key_descr_superscript">Superscript</string>
<string name="key_descr_subscript">Subscript</string>
<string name="key_descr_page_up">Page Up</string>
<string name="key_descr_page_down">Page Down</string>
<string name="key_descr_home">Home</string>
<string name="key_descr_end">End</string>
<!-- Unused -->
<string name="pref_category_advanced">Advanced</string>
</resources>
2 changes: 1 addition & 1 deletion res/xml/bottom_row.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
<key width="1.7" key0="ctrl" key1="loc switch_greekmath" key2="loc meta" key4="switch_numeric"/>
<key width="1.1" key0="fn" key1="loc alt" key2="change_method" key3="switch_emoji" key4="config"/>
<key width="4.4" key0="space" key7="switch_forward" key8="switch_backward" key5="cursor_left" key6="cursor_right" slider="true"/>
<key width="1.1" key7="up" key6="right" key5="left" key8="down"/>
<key width="1.1" key7="up" key6="right" key5="left" key8="down" key1="loc home" key2="loc page_up" key3="loc end" key4="loc page_down"/>
<key width="1.7" key0="enter" key1="loc voice_typing" key2="action"/>
</row>
8 changes: 8 additions & 0 deletions srcs/juloo.keyboard2/ExtraKeysPreference.java
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ public class ExtraKeysPreference extends PreferenceCategory
"†",
"ª",
"º",
"page_up",
"page_down",
"home",
"end",
"switch_greekmath",
"capslock",
"copy",
Expand Down Expand Up @@ -94,6 +98,10 @@ static String key_description(Resources res, String name)
case "º": id = R.string.key_descr_º; break;
case "superscript": id = R.string.key_descr_superscript; break;
case "subscript": id = R.string.key_descr_subscript; break;
case "page_up": id = R.string.key_descr_page_up; break;
case "page_down": id = R.string.key_descr_page_down; break;
case "home": id = R.string.key_descr_home; break;
case "end": id = R.string.key_descr_end; break;
}
if (id == 0)
return null;
Expand Down
4 changes: 4 additions & 0 deletions srcs/juloo.keyboard2/KeyModifier.java
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,10 @@ private static String apply_fn_keyevent(int code)
case KeyEvent.KEYCODE_DPAD_RIGHT: return "end";
case KeyEvent.KEYCODE_ESCAPE: return "insert";
case KeyEvent.KEYCODE_TAB: return "\\t";
case KeyEvent.KEYCODE_PAGE_UP:
case KeyEvent.KEYCODE_PAGE_DOWN:
case KeyEvent.KEYCODE_MOVE_HOME:
case KeyEvent.KEYCODE_MOVE_END: return "removed";
default: return null;
}
}
Expand Down

0 comments on commit 33653a9

Please sign in to comment.