Skip to content

Commit 9c2a791

Browse files
authored
Feature/457/additional keys (#485)
* (#457) Extended key enum * (#457) Added new keys to libnut keyboard mapping
1 parent 4a8e263 commit 9c2a791

File tree

2 files changed

+18
-2
lines changed

2 files changed

+18
-2
lines changed

lib/key.enum.ts

+9
Original file line numberDiff line numberDiff line change
@@ -141,4 +141,13 @@ export enum Key {
141141
AudioForward,
142142
AudioRepeat,
143143
AudioRandom,
144+
145+
LeftWin,
146+
RightWin,
147+
LeftCmd,
148+
RightCmd,
149+
150+
Menu,
151+
152+
Fn,
144153
}

lib/provider/native/libnut-keyboard.class.ts

+9-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,15 @@ export default class KeyboardAction implements KeyboardProviderInterface {
8383
[Key.Tab, "tab"],
8484
[Key.LeftAlt, "alt"],
8585
[Key.LeftControl, "control"],
86-
[Key.RightAlt, "alt"],
87-
[Key.RightControl, "control"],
86+
[Key.RightAlt, "right_alt"],
87+
[Key.RightControl, "right_control"],
88+
[Key.LeftWin, "win"],
89+
[Key.RightWin, "right_win"],
90+
[Key.LeftCmd, "cmd"],
91+
[Key.RightCmd, "right_cmd"],
92+
93+
[Key.Menu, "menu"],
94+
[Key.Fn, "fn"],
8895

8996
[Key.LeftShift, "shift"],
9097
[Key.LeftSuper, "command"],

0 commit comments

Comments
 (0)