Skip to content

Commit

Permalink
fix(common): add missing F13-F24 vkeys
Browse files Browse the repository at this point in the history
  • Loading branch information
marcincichocki committed Nov 28, 2022
1 parent 6f34bef commit a1bf34c
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 2 deletions.
15 changes: 13 additions & 2 deletions src/common/keyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ export const VK_KEY_B = 'KeyB';
export const VK_KEY_N = 'KeyN';
export const VK_KEY_M = 'KeyM';

// [F1-F12]
// MISSING CODES: [F13-F24]
// [F1-F24]
export const VK_F1 = 'F1';
export const VK_F2 = 'F2';
export const VK_F3 = 'F3';
Expand All @@ -64,6 +63,18 @@ export const VK_F9 = 'F9';
export const VK_F10 = 'F10';
export const VK_F11 = 'F11';
export const VK_F12 = 'F12';
export const VK_F13 = 'F13';
export const VK_F14 = 'F14';
export const VK_F15 = 'F15';
export const VK_F16 = 'F16';
export const VK_F17 = 'F17';
export const VK_F18 = 'F18';
export const VK_F19 = 'F19';
export const VK_F20 = 'F20';
export const VK_F21 = 'F21';
export const VK_F22 = 'F22';
export const VK_F23 = 'F23';
export const VK_F24 = 'F24';
export const VK_BACKQUOTE = 'Backquote';
export const VK_MINUS = 'Minus';
export const VK_EQUAL = 'Equal';
Expand Down
12 changes: 12 additions & 0 deletions src/common/node/robot/win32.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,18 @@ export abstract class WindowsRobot extends BreachProtocolRobot {
[k.VK_F10, 0x79],
[k.VK_F11, 0x7a],
[k.VK_F12, 0x7b],
[k.VK_F13, 0x7c],
[k.VK_F14, 0x7d],
[k.VK_F15, 0x7e],
[k.VK_F16, 0x7f],
[k.VK_F17, 0x80],
[k.VK_F18, 0x81],
[k.VK_F19, 0x82],
[k.VK_F20, 0x83],
[k.VK_F21, 0x84],
[k.VK_F22, 0x85],
[k.VK_F23, 0x86],
[k.VK_F24, 0x87],
[k.VK_BACKQUOTE, 0xc0],
[k.VK_MINUS, 0xbd],
[k.VK_EQUAL, 0xbb],
Expand Down
12 changes: 12 additions & 0 deletions src/common/node/robot/xdotool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,18 @@ export class XDoToolRobot extends BreachProtocolRobot {
[k.VK_F10, 0xffc7],
[k.VK_F11, 0xffc8],
[k.VK_F12, 0xffc9],
[k.VK_F13, 0xffca],
[k.VK_F14, 0xffcb],
[k.VK_F15, 0xffcc],
[k.VK_F16, 0xffcd],
[k.VK_F17, 0xffce],
[k.VK_F18, 0xffcf],
[k.VK_F19, 0xffd0],
[k.VK_F20, 0xffd1],
[k.VK_F21, 0xffd2],
[k.VK_F22, 0xffd3],
[k.VK_F23, 0xffd4],
[k.VK_F24, 0xffd5],
[k.VK_BACKQUOTE, 0x0060],
[k.VK_MINUS, 0x002d],
[k.VK_EQUAL, 0x003d],
Expand Down
12 changes: 12 additions & 0 deletions src/electron/renderer/components/AcceleratorKeyBind.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,18 @@ const keys: [string, string][] = [
[k.VK_F10, 'F10'],
[k.VK_F11, 'F11'],
[k.VK_F12, 'F12'],
[k.VK_F13, 'F13'],
[k.VK_F14, 'F14'],
[k.VK_F15, 'F15'],
[k.VK_F16, 'F16'],
[k.VK_F17, 'F17'],
[k.VK_F18, 'F18'],
[k.VK_F19, 'F19'],
[k.VK_F20, 'F20'],
[k.VK_F21, 'F21'],
[k.VK_F22, 'F22'],
[k.VK_F23, 'F23'],
[k.VK_F24, 'F24'],
[k.VK_BACKQUOTE, '`'],
[k.VK_MINUS, '-'],
[k.VK_EQUAL, '='],
Expand Down

0 comments on commit a1bf34c

Please sign in to comment.