Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Numpad/Keypad #1

Open
ghe0 opened this issue Aug 10, 2023 · 5 comments
Open

Numpad/Keypad #1

ghe0 opened this issue Aug 10, 2023 · 5 comments

Comments

@ghe0
Copy link

ghe0 commented Aug 10, 2023

Did you try remapping the keypad/numpad keys in nvim? They should map to kUp dDown kPageUp and so on, but they map to Up Down PageUp instead. Konsole is blocking the correct numpad keys from propagating.

The only solution I found was to switch to the kitty terminal

@Zardoz89
Copy link
Owner

I don't use numpad keys usually, . but I just did a quick check, and numpad keys works like the normal keys (up, down, pagedown, pageup, etc). I think that is the indented behaviour... because they are the same keys ?

@ghe0
Copy link
Author

ghe0 commented Aug 10, 2023

I don't use numpad keys usually, . but I just did a quick check, and numpad keys works like the normal keys (up, down, pagedown, pageup, etc). I think that is the indented behaviour... because they are the same keys ?

Nope. They should be interpreted as different keys. To test this:

  • start neovim
  • enter insert mode
  • press CTRL+V
  • press Page Up

If you press the normal page up, you should see <PageUp>. If you press the numap page up, you should see <kPageUp>.

For me, this has different behaviours in Konsole and in the Kitty terminal. Normally, you should be able to map the keys differently in nvim/

@Zardoz89
Copy link
Owner

Umm.... Strange. nvim-qt does exactly the same thing . There isn't

@ghe0
Copy link
Author

ghe0 commented Aug 10, 2023

Whe using ~/.config/nvim/init.lua, this can be used to test:

vim.api.nvim_set_keymap('n', '<kRight>', '<C-W>l', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<kLeft>', '<C-W>h', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<kDown>', '<C-W>j', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<kUp>', '<C-W>k', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<S-kRight>', '<C-W>L', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<S-kLeft>', '<C-W>H', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<S-kUp>', '<C-W>K', { noremap = true, silent = true })
vim.api.nvim_set_keymap('n', '<S-kDown>', '<C-W>J', { noremap = true, silent = true })

This allows you to navigate between splits and to reposition splits on the screen with the arrow keys on the numpad and using shift+arrow. However it will work only if nvim correctly recognizes the numpad, so it does not work for me in Konsole.

@Zardoz89
Copy link
Owner

Umm... I have a try to kitty , only to see this problem. Even with kitty on my system, I don't get any ... So I think that isn't only the shell doing something here :

imagen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants