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
fwk: make fn+right ctrl emit menu key
This behavior is standard on many devices, including
Microsoft Surface, Dell XPS, and Acer Aspire.

Signed-off-by: Jules Bertholet <[email protected]>
  • Loading branch information
Jules-Bertholet committed Oct 31, 2024
commit 86491854b9c5edf1508d0b353bd9e1904c2ca3ce
4 changes: 4 additions & 0 deletions board/hx20/keyboard_customization.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ int hotkey_special_key(uint16_t *key_code, int8_t pressed)
/*if (!fn_table_set(pressed, KB_FN_S))*/

break;
case SCANCODE_RIGHT_CTRL: /* MENU */
if (fn_table_set(pressed, KB_FN_RIGHT_CTRL))
*key_code = SCANCODE_MENU;
break;
case SCANCODE_LEFT: /* HOME */
if (fn_table_set(pressed, KB_FN_LEFT))
*key_code = 0xe06c;
Expand Down
1 change: 1 addition & 0 deletions board/hx20/keyboard_customization.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ enum kb_fn_table {
KB_FN_B = BIT(20),
KB_FN_P = BIT(21),
KB_FN_SPACE = BIT(22),
KB_FN_RIGHT_CTRL = BIT(23),
};

#ifdef CONFIG_KEYBOARD_BACKLIGHT
Expand Down
4 changes: 4 additions & 0 deletions board/hx30/keyboard_customization.c
Original file line number Diff line number Diff line change
Expand Up @@ -384,6 +384,10 @@ int hotkey_special_key(uint16_t *key_code, int8_t pressed)
/*if (!fn_table_set(pressed, KB_FN_S))*/

break;
case SCANCODE_RIGHT_CTRL: /* MENU */
if (fn_table_set(pressed, KB_FN_RIGHT_CTRL))
*key_code = SCANCODE_MENU;
break;
case SCANCODE_LEFT: /* HOME */
if (fn_table_set(pressed, KB_FN_LEFT))
*key_code = 0xe06c;
Expand Down
1 change: 1 addition & 0 deletions board/hx30/keyboard_customization.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ enum kb_fn_table {
KB_FN_B = BIT(20),
KB_FN_P = BIT(21),
KB_FN_SPACE = BIT(22),
KB_FN_RIGHT_CTRL = BIT(23),
};

#ifdef CONFIG_KEYBOARD_BACKLIGHT
Expand Down
Loading