Skip to content

Commit

Permalink
Support keypad
Browse files Browse the repository at this point in the history
closes #38
  • Loading branch information
NilsBarlaug authored and nikitabobko committed Dec 6, 2023
1 parent e164c4f commit 225e29f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 5 deletions.
12 changes: 7 additions & 5 deletions config-examples/default-config.toml
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,13 @@ non-empty-workspaces-root-containers-layout-on-startup = 'smart'
[mode.main.binding]

# All possible keys:
# - Letters. a, b, c, ..., z
# - Numbers. 0, 1, 2, ..., 9
# - F-keys. f1, f2, ..., f20
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick, leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Arrows. left, down, up, right
# - Letters. a, b, c, ..., z
# - Numbers. 0, 1, 2, ..., 9
# - Keypad numbers. keypad0, keypad1, keypad2, ..., keypad9
# - F-keys. f1, f2, ..., f20
# - Special keys. minus, equal, period, comma, slash, backslash, quote, semicolon, backtick, leftSquareBracket, rightSquareBracket, space, enter, esc, backspace, tab
# - Keypad special. keypadClear, keypadDecimalMark, keypadDivide, keypadEnter, keypadEqual, keypadMinus, keypadMultiply, keypadPlus
# - Arrows. left, down, up, right

# All possible modifiers: cmd, alt, ctrl, shift

Expand Down
19 changes: 19 additions & 0 deletions src/config/keysMap.swift
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,25 @@ let keysMap: [String: Key] = [
"8": .eight,
"9": .nine,

"keypad0": .keypad0,
"keypad1": .keypad1,
"keypad2": .keypad2,
"keypad3": .keypad3,
"keypad4": .keypad4,
"keypad5": .keypad5,
"keypad6": .keypad6,
"keypad7": .keypad7,
"keypad8": .keypad8,
"keypad9": .keypad9,
"keypadClear": .keypadClear,
"keypadDecimalMark": .keypadDecimal,
"keypadDivide": .keypadDivide,
"keypadEnter": .keypadEnter,
"keypadEqual": .keypadEquals,
"keypadMinus": .keypadMinus,
"keypadMultiply": .keypadMultiply,
"keypadPlus": .keypadPlus,

"f1": .f1,
"f2": .f2,
"f3": .f3,
Expand Down

0 comments on commit 225e29f

Please sign in to comment.