Skip to content
Open
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: map fn+left win to right win
Allows users to customize the behavior of fn+win
by remapping right win in the OS.

Signed-off-by: Jules Bertholet <[email protected]>
  • Loading branch information
Jules-Bertholet committed Nov 30, 2024
commit ff860fda3cd0c2fe1651a6ec36090179b5acbc89
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_LEFT_WIN: /* RIGHT WIN */
if (fn_table_set(pressed, KB_FN_LEFT_WIN))
*key_code = SCANCODE_RIGHT_WIN;
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_LEFT_WIN = BIT(24),
};

#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_LEFT_WIN: /* RIGHT WIN */
if (fn_table_set(pressed, KB_FN_LEFT_WIN))
*key_code = SCANCODE_RIGHT_WIN;
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_LEFT_WIN = BIT(24),
};

#ifdef CONFIG_KEYBOARD_BACKLIGHT
Expand Down