diff --git a/metainfo.xml b/metainfo.xml
index d71a699f10..d4a2ce4f46 100644
--- a/metainfo.xml
+++ b/metainfo.xml
@@ -149,6 +149,7 @@
Fixes bell sound in spawned window in same process (#1515)
Fixes status line crush (#1511)
Fixes application window icon on (KDE) Wayland
+ Fixes missing keymapping for numpad (#1325)
Improves handling of constant bell sound spawning
Fixes yW (yank WORD) not working properly in normal mode (#1448)
diff --git a/src/contour/Config.cpp b/src/contour/Config.cpp
index 273291d5bc..2b303d1c7b 100644
--- a/src/contour/Config.cpp
+++ b/src/contour/Config.cpp
@@ -1392,7 +1392,10 @@ bool YAMLConfigReader::tryAddKey(InputMappings& inputMappings,
auto const input = parseKeyOrChar(node.as());
if (!input.has_value())
+ {
+ logger()("Could not parse key:{}", node.as());
return false;
+ }
if (holds_alternative(*input))
{
@@ -1448,69 +1451,85 @@ std::optional YAMLConfigReader::parseKey(std::string const& name
{
using vtbackend::Key;
using namespace std::literals::string_view_literals;
- auto static constexpr Mappings = std::array {
- std::pair { "F1"sv, Key::F1 },
- std::pair { "F2"sv, Key::F2 },
- std::pair { "F3"sv, Key::F3 },
- std::pair { "F4"sv, Key::F4 },
- std::pair { "F5"sv, Key::F5 },
- std::pair { "F6"sv, Key::F6 },
- std::pair { "F7"sv, Key::F7 },
- std::pair { "F8"sv, Key::F8 },
- std::pair { "F9"sv, Key::F9 },
- std::pair { "F10"sv, Key::F10 },
- std::pair { "F11"sv, Key::F11 },
- std::pair { "F12"sv, Key::F12 },
- std::pair { "F13"sv, Key::F13 },
- std::pair { "F14"sv, Key::F14 },
- std::pair { "F15"sv, Key::F15 },
- std::pair { "F16"sv, Key::F16 },
- std::pair { "F17"sv, Key::F17 },
- std::pair { "F18"sv, Key::F18 },
- std::pair { "F19"sv, Key::F19 },
- std::pair { "F20"sv, Key::F20 },
- std::pair { "F21"sv, Key::F21 },
- std::pair { "F22"sv, Key::F22 },
- std::pair { "F23"sv, Key::F23 },
- std::pair { "F24"sv, Key::F24 },
- std::pair { "F25"sv, Key::F25 },
- std::pair { "F26"sv, Key::F26 },
- std::pair { "F27"sv, Key::F27 },
- std::pair { "F28"sv, Key::F28 },
- std::pair { "F29"sv, Key::F29 },
- std::pair { "F30"sv, Key::F30 },
- std::pair { "F31"sv, Key::F31 },
- std::pair { "F32"sv, Key::F32 },
- std::pair { "F33"sv, Key::F33 },
- std::pair { "F34"sv, Key::F34 },
- std::pair { "F35"sv, Key::F35 },
- std::pair { "Escape"sv, Key::Escape },
- std::pair { "Enter"sv, Key::Enter },
- std::pair { "Tab"sv, Key::Tab },
- std::pair { "Backspace"sv, Key::Backspace },
- std::pair { "DownArrow"sv, Key::DownArrow },
- std::pair { "LeftArrow"sv, Key::LeftArrow },
- std::pair { "RightArrow"sv, Key::RightArrow },
- std::pair { "UpArrow"sv, Key::UpArrow },
- std::pair { "Insert"sv, Key::Insert },
- std::pair { "Delete"sv, Key::Delete },
- std::pair { "Home"sv, Key::Home },
- std::pair { "End"sv, Key::End },
- std::pair { "PageUp"sv, Key::PageUp },
- std::pair { "PageDown"sv, Key::PageDown },
- std::pair { "MediaPlay"sv, Key::MediaPlay },
- std::pair { "MediaStop"sv, Key::MediaStop },
- std::pair { "MediaPrevious"sv, Key::MediaPrevious },
- std::pair { "MediaNext"sv, Key::MediaNext },
- std::pair { "MediaPause"sv, Key::MediaPause },
- std::pair { "MediaTogglePlayPause"sv, Key::MediaTogglePlayPause },
- std::pair { "VolumeUp"sv, Key::VolumeUp },
- std::pair { "VolumeDown"sv, Key::VolumeDown },
- std::pair { "VolumeMute"sv, Key::VolumeMute },
- std::pair { "PrintScreen"sv, Key::PrintScreen },
- std::pair { "Pause"sv, Key::Pause },
- std::pair { "Menu"sv, Key::Menu },
- };
+ auto static constexpr Mappings =
+ std::array { std::pair { "F1"sv, Key::F1 },
+ std::pair { "F2"sv, Key::F2 },
+ std::pair { "F3"sv, Key::F3 },
+ std::pair { "F4"sv, Key::F4 },
+ std::pair { "F5"sv, Key::F5 },
+ std::pair { "F6"sv, Key::F6 },
+ std::pair { "F7"sv, Key::F7 },
+ std::pair { "F8"sv, Key::F8 },
+ std::pair { "F9"sv, Key::F9 },
+ std::pair { "F10"sv, Key::F10 },
+ std::pair { "F11"sv, Key::F11 },
+ std::pair { "F12"sv, Key::F12 },
+ std::pair { "F13"sv, Key::F13 },
+ std::pair { "F14"sv, Key::F14 },
+ std::pair { "F15"sv, Key::F15 },
+ std::pair { "F16"sv, Key::F16 },
+ std::pair { "F17"sv, Key::F17 },
+ std::pair { "F18"sv, Key::F18 },
+ std::pair { "F19"sv, Key::F19 },
+ std::pair { "F20"sv, Key::F20 },
+ std::pair { "F21"sv, Key::F21 },
+ std::pair { "F22"sv, Key::F22 },
+ std::pair { "F23"sv, Key::F23 },
+ std::pair { "F24"sv, Key::F24 },
+ std::pair { "F25"sv, Key::F25 },
+ std::pair { "F26"sv, Key::F26 },
+ std::pair { "F27"sv, Key::F27 },
+ std::pair { "F28"sv, Key::F28 },
+ std::pair { "F29"sv, Key::F29 },
+ std::pair { "F30"sv, Key::F30 },
+ std::pair { "F31"sv, Key::F31 },
+ std::pair { "F32"sv, Key::F32 },
+ std::pair { "F33"sv, Key::F33 },
+ std::pair { "F34"sv, Key::F34 },
+ std::pair { "F35"sv, Key::F35 },
+ std::pair { "Escape"sv, Key::Escape },
+ std::pair { "Enter"sv, Key::Enter },
+ std::pair { "Tab"sv, Key::Tab },
+ std::pair { "Backspace"sv, Key::Backspace },
+ std::pair { "DownArrow"sv, Key::DownArrow },
+ std::pair { "LeftArrow"sv, Key::LeftArrow },
+ std::pair { "RightArrow"sv, Key::RightArrow },
+ std::pair { "UpArrow"sv, Key::UpArrow },
+ std::pair { "Insert"sv, Key::Insert },
+ std::pair { "Delete"sv, Key::Delete },
+ std::pair { "Home"sv, Key::Home },
+ std::pair { "End"sv, Key::End },
+ std::pair { "PageUp"sv, Key::PageUp },
+ std::pair { "PageDown"sv, Key::PageDown },
+ std::pair { "MediaPlay"sv, Key::MediaPlay },
+ std::pair { "MediaStop"sv, Key::MediaStop },
+ std::pair { "MediaPrevious"sv, Key::MediaPrevious },
+ std::pair { "MediaNext"sv, Key::MediaNext },
+ std::pair { "MediaPause"sv, Key::MediaPause },
+ std::pair { "MediaTogglePlayPause"sv, Key::MediaTogglePlayPause },
+ std::pair { "VolumeUp"sv, Key::VolumeUp },
+ std::pair { "VolumeDown"sv, Key::VolumeDown },
+ std::pair { "VolumeMute"sv, Key::VolumeMute },
+ std::pair { "PrintScreen"sv, Key::PrintScreen },
+ std::pair { "Pause"sv, Key::Pause },
+ std::pair { "Menu"sv, Key::Menu },
+ std::pair { "Numpad_Add"sv, Key::Numpad_Add },
+ std::pair { "Numpad_Divide"sv, Key::Numpad_Divide },
+ std::pair { "Numpad_Multiply"sv, Key::Numpad_Multiply },
+ std::pair { "Numpad_Subtract"sv, Key::Numpad_Subtract },
+ std::pair { "Numpad_Decimal"sv, Key::Numpad_Decimal },
+ std::pair { "Numpad_Enter"sv, Key::Numpad_Enter },
+ std::pair { "Numpad_Equal"sv, Key::Numpad_Equal },
+ std::pair { "Numpad_0"sv, Key::Numpad_0 },
+ std::pair { "Numpad_1"sv, Key::Numpad_1 },
+ std::pair { "Numpad_2"sv, Key::Numpad_2 },
+ std::pair { "Numpad_3"sv, Key::Numpad_3 },
+ std::pair { "Numpad_4"sv, Key::Numpad_4 },
+ std::pair { "Numpad_5"sv, Key::Numpad_5 },
+ std::pair { "Numpad_6"sv, Key::Numpad_6 },
+ std::pair { "Numpad_7"sv, Key::Numpad_7 },
+ std::pair { "Numpad_8"sv, Key::Numpad_8 },
+ std::pair { "Numpad_9"sv, Key::Numpad_9 } };
auto const lowerName = crispy::toLower(name);