Skip to content

Commit

Permalink
fix: fix support for BS keycode
Browse files Browse the repository at this point in the history
Refs: #20
  • Loading branch information
jokajak committed Aug 7, 2023
1 parent cc82cff commit 49e3ac7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions lua/keyseer/keymaps/keypress.lua
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ function Keypress.get_keycode(keystring)
"<F10>",
"<CR>",
"<Tab>",
"<BS>",
}

if #key_presses > 1 then
Expand Down
1 change: 1 addition & 0 deletions tests/test_keymaps.lua
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ T["keypress"]["finds keycodes"] = function()
eq_global(child, "Keypress.get_keycode('<F2>')", "<F2>")
eq_global(child, "Keypress.get_keycode('<CR>')", "<CR>")
eq_global(child, "Keypress.get_keycode('<Tab>')", "<Tab>")
eq_global(child, "Keypress.get_keycode('<BS>')", "<BS>")
end

return T
1 change: 1 addition & 0 deletions tests/test_utils.lua
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ T["utils"]["parses keystrings"] = function()
eq_global(child, "utils.parse_keystring('<S-Up>')", { { "<Shift>", "Up" } })
eq_global(child, "utils.parse_keystring('<M-S>')", { { "<Meta>", "S" } })
eq_global(child, "utils.parse_keystring('<Tab>')", { { "<Tab>" } })
eq_global(child, "utils.parse_keystring('<BS>')", { { "<BS>" } })
end

T["buttons"] = MiniTest.new_set()
Expand Down

0 comments on commit 49e3ac7

Please sign in to comment.