Skip to content

Commit ebf8512

Browse files
fwk: add fn key combinations for row B end keys
Maps fn+Z to the ISO 102nd key, and fn+/ to the extra key left of right shift on Brazilian and Japanese layouts. This allows full use of ISO and Brazilian layouts on ANSI, ISO, or JIS keyboard hardware. (Alternately, users can remap these keys in the OS to whatever function they prefer.) Signed-off-by: Jules Bertholet <[email protected]>
1 parent 73f1196 commit ebf8512

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed

board/hx20/keyboard_customization.c

+8
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,14 @@ int hotkey_special_key(uint16_t *key_code, int8_t pressed)
384384
/*if (!fn_table_set(pressed, KB_FN_S))*/
385385

386386
break;
387+
case 0x001A: /* Z -> 102ND */
388+
if (fn_table_set(pressed, KB_FN_Z))
389+
*key_code = 0x0061;
390+
break;
391+
case 0x004A: /* ? -> RO KANA */
392+
if (fn_table_set(pressed, KB_FN_QUESTIONMARK))
393+
*key_code = 0x0051;
394+
break;
387395
case SCANCODE_LEFT: /* HOME */
388396
if (fn_table_set(pressed, KB_FN_LEFT))
389397
*key_code = 0xe06c;

board/hx20/keyboard_customization.h

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ enum kb_fn_table {
9696
KB_FN_B = BIT(20),
9797
KB_FN_P = BIT(21),
9898
KB_FN_SPACE = BIT(22),
99+
KB_FN_Z = BIT(25),
100+
KB_FN_QUESTIONMARK = BIT(26),
99101
};
100102

101103
#ifdef CONFIG_KEYBOARD_BACKLIGHT

board/hx30/keyboard_customization.c

+8
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,14 @@ int hotkey_special_key(uint16_t *key_code, int8_t pressed)
384384
/*if (!fn_table_set(pressed, KB_FN_S))*/
385385

386386
break;
387+
case 0x001A: /* Z -> 102ND */
388+
if (fn_table_set(pressed, KB_FN_Z))
389+
*key_code = 0x0061;
390+
break;
391+
case 0x004A: /* ? -> RO KANA */
392+
if (fn_table_set(pressed, KB_FN_QUESTIONMARK))
393+
*key_code = 0x0051;
394+
break;
387395
case SCANCODE_LEFT: /* HOME */
388396
if (fn_table_set(pressed, KB_FN_LEFT))
389397
*key_code = 0xe06c;

board/hx30/keyboard_customization.h

+2
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,8 @@ enum kb_fn_table {
9696
KB_FN_B = BIT(20),
9797
KB_FN_P = BIT(21),
9898
KB_FN_SPACE = BIT(22),
99+
KB_FN_Z = BIT(25),
100+
KB_FN_QUESTIONMARK = BIT(26),
99101
};
100102

101103
#ifdef CONFIG_KEYBOARD_BACKLIGHT

0 commit comments

Comments
 (0)