Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 53922c8

Browse files
committedNov 30, 2024··
fwk: add fn key mappings for JIS IME keys
fn+C is mapped to Muhenkan, fn+M is mapped to Henkan, and fn+, is mapped to Katakana/Hiragana. Signed-off-by: Jules Bertholet <julesbertholet@quoi.xyz>
1 parent 2497ac1 commit 53922c8

File tree

4 files changed

+30
-0
lines changed

4 files changed

+30
-0
lines changed
 

‎board/hx20/keyboard_customization.c

+12
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,18 @@ int hotkey_special_key(uint16_t *key_code, int8_t pressed)
392392
if (fn_table_set(pressed, KB_FN_Z))
393393
*key_code = 0x0061;
394394
break;
395+
case 0x0021: /* C -> MUHENKAN */
396+
if (fn_table_set(pressed, KB_FN_C))
397+
*key_code = 0x0067;
398+
break;
399+
case 0x003A: /* M -> HENKAN */
400+
if (fn_table_set(pressed, KB_FN_M))
401+
*key_code = 0x0064;
402+
break;
403+
case 0x0041: /* , -> KATAKANA HIRAGANA */
404+
if (fn_table_set(pressed, KB_FN_COMMA))
405+
*key_code = 0x0013;
406+
break;
395407
case 0x004A: /* ? -> RO KANA */
396408
if (fn_table_set(pressed, KB_FN_QUESTIONMARK))
397409
*key_code = 0x0051;

‎board/hx20/keyboard_customization.h

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ enum kb_fn_table {
9999
KB_FN_Z = BIT(25),
100100
KB_FN_QUESTIONMARK = BIT(26),
101101
KB_FN_EQUALS = BIT(27),
102+
KB_FN_C = BIT(28),
103+
KB_FN_M = BIT(29),
104+
KB_FN_COMMA = BIT(30),
102105
};
103106

104107
#ifdef CONFIG_KEYBOARD_BACKLIGHT

‎board/hx30/keyboard_customization.c

+12
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,18 @@ int hotkey_special_key(uint16_t *key_code, int8_t pressed)
392392
if (fn_table_set(pressed, KB_FN_Z))
393393
*key_code = 0x0061;
394394
break;
395+
case 0x0021: /* C -> MUHENKAN */
396+
if (fn_table_set(pressed, KB_FN_C))
397+
*key_code = 0x0067;
398+
break;
399+
case 0x003A: /* M -> HENKAN */
400+
if (fn_table_set(pressed, KB_FN_M))
401+
*key_code = 0x0064;
402+
break;
403+
case 0x0041: /* , -> KATAKANA HIRAGANA */
404+
if (fn_table_set(pressed, KB_FN_COMMA))
405+
*key_code = 0x0013;
406+
break;
395407
case 0x004A: /* ? -> RO KANA */
396408
if (fn_table_set(pressed, KB_FN_QUESTIONMARK))
397409
*key_code = 0x0051;

‎board/hx30/keyboard_customization.h

+3
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@ enum kb_fn_table {
9999
KB_FN_Z = BIT(25),
100100
KB_FN_QUESTIONMARK = BIT(26),
101101
KB_FN_EQUALS = BIT(27),
102+
KB_FN_C = BIT(28),
103+
KB_FN_M = BIT(29),
104+
KB_FN_COMMA = BIT(30),
102105
};
103106

104107
#ifdef CONFIG_KEYBOARD_BACKLIGHT

0 commit comments

Comments
 (0)
Please sign in to comment.