@@ -22,7 +22,10 @@ class KeyValue
22
22
public static final int FLAG_NOREPEAT = (1 << 2 );
23
23
public static final int FLAG_NOCHAR = (1 << 3 );
24
24
public static final int FLAG_PRECISE_REPEAT = (1 << 4 );
25
+
26
+ // Rendering flags
25
27
public static final int FLAG_KEY_FONT = (1 << 5 );
28
+ public static final int FLAG_SMALLER_FONT = (1 << 6 );
26
29
27
30
// Internal flags
28
31
public static final int FLAG_LOCKED = (1 << 8 );
@@ -151,9 +154,10 @@ private static void addEventKey(String name, String symbol, int event, int flags
151
154
152
155
static
153
156
{
154
- addModifierKey ("shift" , "\uE808 " , FLAG_LOCK | FLAG_SHIFT | FLAG_KEY_FONT );
155
- addModifierKey ("ctrl" , "Ctrl" , FLAG_CTRL );
156
- addModifierKey ("alt" , "Alt" , FLAG_ALT );
157
+ addModifierKey ("shift" , "\uE808 " ,
158
+ FLAG_LOCK | FLAG_SHIFT | FLAG_KEY_FONT | FLAG_SMALLER_FONT );
159
+ addModifierKey ("ctrl" , "Ctrl" , FLAG_CTRL | FLAG_SMALLER_FONT );
160
+ addModifierKey ("alt" , "Alt" , FLAG_ALT | FLAG_SMALLER_FONT );
157
161
addModifierKey ("accent_aigu" , "◌́" , FLAG_ACCENT2 );
158
162
addModifierKey ("accent_caron" , "◌̌" , FLAG_ACCENT_CARON );
159
163
addModifierKey ("accent_cedille" , "◌̧" , FLAG_ACCENT5 );
@@ -165,8 +169,8 @@ private static void addEventKey(String name, String symbol, int event, int flags
165
169
addModifierKey ("accent_ring" , "◌̊" , FLAG_ACCENT_RING );
166
170
addModifierKey ("superscript" , "◌͆" , FLAG_ACCENT_SUPERSCRIPT );
167
171
addModifierKey ("subscript" , "◌̺" , FLAG_ACCENT_SUBSCRIPT );
168
- addModifierKey ("ordinal" , "ºʳᵈ" , FLAG_ACCENT_ORDINAL );
169
- addModifierKey ("fn" , "Fn" , FLAG_FN );
172
+ addModifierKey ("ordinal" , "ºʳᵈ" , FLAG_ACCENT_ORDINAL | FLAG_SMALLER_FONT );
173
+ addModifierKey ("fn" , "Fn" , FLAG_FN | FLAG_SMALLER_FONT );
170
174
addModifierKey ("meta" , "◆" , FLAG_META );
171
175
172
176
addCharKey ('a' , KeyEvent .KEYCODE_A );
@@ -226,15 +230,15 @@ private static void addEventKey(String name, String symbol, int event, int flags
226
230
addCharKey ('€' , EVENT_NONE , FLAG_LANG_EURO );
227
231
addCharKey ('£' , EVENT_NONE , FLAG_LANG_POUND );
228
232
229
- addSpecialKey ("config" , "\uE806 " , EVENT_CONFIG , FLAG_KEY_FONT );
233
+ addSpecialKey ("config" , "\uE806 " , EVENT_CONFIG , FLAG_KEY_FONT | FLAG_SMALLER_FONT );
230
234
addSpecialKey ("switch_text" , "ABC" , EVENT_SWITCH_TEXT );
231
235
addSpecialKey ("switch_numeric" , "123+" , EVENT_SWITCH_NUMERIC );
232
- addSpecialKey ("switch_emoji" , "\uE812 " , EVENT_SWITCH_EMOJI , FLAG_KEY_FONT );
236
+ addSpecialKey ("switch_emoji" , "\uE812 " , EVENT_SWITCH_EMOJI , FLAG_KEY_FONT | FLAG_SMALLER_FONT );
233
237
addSpecialKey ("switch_back_emoji" , "ABC" , EVENT_SWITCH_BACK_EMOJI );
234
- addSpecialKey ("change_method" , "\ue807 " , EVENT_CHANGE_METHOD , FLAG_KEY_FONT );
238
+ addSpecialKey ("change_method" , "\ue807 " , EVENT_CHANGE_METHOD , FLAG_KEY_FONT | FLAG_SMALLER_FONT );
235
239
addSpecialKey ("action" , "Action" , EVENT_ACTION ); // Will always be replaced
236
240
237
- addEventKey ("esc" , "Esc" , KeyEvent .KEYCODE_ESCAPE );
241
+ addEventKey ("esc" , "Esc" , KeyEvent .KEYCODE_ESCAPE , FLAG_SMALLER_FONT );
238
242
addEventKey ("enter" , "\ue800 " , KeyEvent .KEYCODE_ENTER , FLAG_KEY_FONT );
239
243
addEventKey ("up" , "\uE80B " , KeyEvent .KEYCODE_DPAD_UP , FLAG_KEY_FONT | FLAG_PRECISE_REPEAT );
240
244
addEventKey ("right" , "\uE80C " , KeyEvent .KEYCODE_DPAD_RIGHT , FLAG_KEY_FONT | FLAG_PRECISE_REPEAT );
@@ -244,9 +248,9 @@ private static void addEventKey(String name, String symbol, int event, int flags
244
248
addEventKey ("page_down" , "\uE811 " , KeyEvent .KEYCODE_PAGE_DOWN , FLAG_KEY_FONT );
245
249
addEventKey ("home" , "\uE80E " , KeyEvent .KEYCODE_MOVE_HOME , FLAG_KEY_FONT );
246
250
addEventKey ("end" , "\uE80F " , KeyEvent .KEYCODE_MOVE_END , FLAG_KEY_FONT );
247
- addEventKey ("backspace" , "⌫" , KeyEvent .KEYCODE_DEL );
248
- addEventKey ("delete" , "⌦" , KeyEvent .KEYCODE_FORWARD_DEL );
249
- addEventKey ("insert" , "Ins" , KeyEvent .KEYCODE_INSERT );
251
+ addEventKey ("backspace" , "⌫" , KeyEvent .KEYCODE_DEL , FLAG_SMALLER_FONT );
252
+ addEventKey ("delete" , "⌦" , KeyEvent .KEYCODE_FORWARD_DEL , FLAG_SMALLER_FONT );
253
+ addEventKey ("insert" , "Ins" , KeyEvent .KEYCODE_INSERT , FLAG_SMALLER_FONT );
250
254
addEventKey ("f1" , "F1" , KeyEvent .KEYCODE_F1 );
251
255
addEventKey ("f2" , "F2" , KeyEvent .KEYCODE_F2 );
252
256
addEventKey ("f3" , "F3" , KeyEvent .KEYCODE_F3 );
@@ -260,6 +264,6 @@ private static void addEventKey(String name, String symbol, int event, int flags
260
264
addEventKey ("tab" , "↹" , KeyEvent .KEYCODE_TAB );
261
265
262
266
addKey ("\\ t" , "\\ t" , '\t' , EVENT_NONE , 0 ); // Send the tab character
263
- addKey ("space" , "\ue80d " , ' ' , KeyEvent .KEYCODE_SPACE , FLAG_KEY_FONT );
267
+ addKey ("space" , "\ue80d " , ' ' , KeyEvent .KEYCODE_SPACE , FLAG_KEY_FONT | FLAG_SMALLER_FONT );
264
268
}
265
269
}
0 commit comments