Dominique Stender
Dominique Stender

Reputation: 67

neovim Ctrl-Cursor key bind prints characters in rxvt terminals, does what it should in others

I have neovim configured to change the size of a split window via Ctrl-Cursor keys:

keymap("n", "<C-Up>", ":resize -2<CR>", opts)
keymap("n", "<C-Down>", ":resize +2<CR>", opts)
keymap("n", "<C-Left>", ":vertical resize -2<CR>", opts)
keymap("n", "<C-Right>", ":vertical resize +2<CR>", opts)

neovim runs in a rxvt-unicode terminal, i3wm is my window manager. I've recently switched to rxvt, there are no active plugins.

When I'm in neovim normal mode and use Ctrl-[cursor] to resize, it switches to insert mode, prints a single letter at the line of the cursor and moves the content below down.

The keybind does work and resizes the nvim windows if I use gnome-terminal or xterm.

My .Xdefaults file doesn't define any keybinds that involve the cursor keys. Here's my complete .Xdefaults file:

! rxvt settings
! transparency settings
URxvt.inheritPixmap: true
URxvt.transparent: false
URxvt.tintColor: #000000
URxvt.shading: 45

! other settings
URxvt.geometry: 90x25+180+200
URxvt.perl-lib: /home/dominique/.config/urxvt/
!URxvt.perl-ext-common: matcher,keyboard-select,resize-font
!URxvt.perl-ext-common: matcher

URxvt.cursorColor:magenta
URxvt.scrollBar:False
URxvt.saveLines:3000
URxvt.preeditType:Root
URxvt.modifier: alt

! plugins
!! resize-font
!URxvt.resize-font.smaller:  C-j
!URxvt.resize-font.bigger:   C-k

!! open URL in browser
URxvt.urlLauncher: chromium
URxvt.matcher.button: 1

! Colors
URxvt*background: #000000
URxvt*foreground: #B2B2B2
!! black
URxvt*color0:  #000000
URxvt*color8:  #686868
!! red
URxvt*color1:  #B21818
URxvt*color9:  #FF5454
!! green
URxvt*color2:  #18B218
URxvt*color10: #54FF54
!! yellow
URxvt*color3:  #B26818
URxvt*color11: #FFFF54
!! blue
URxvt*color4:  #1818B2
URxvt*color12: #5454FF
!! purple
URxvt*color5:  #B218B2
URxvt*color13: #FF54FF
!! cyan
URxvt*color6:  #18B2B2
URxvt*color14: #54FFFF
!! white
URxvt*color7:  #B2B2B2
URxvt*color15: #FFFFFF

! normal font
URxvt.font:xft:MesloLGS NF:size=12:antialias=true,xft:Hack Nerd Font Mono:pixelsize=16:antialias=true,xft:DejaVu Sans Mono:pixelsize=13:antialias=true

! bold font
URxvt.boldFont:xft:MesloLGS NF:size=12:antialias=true:Bold,xft:Hack Nerd Font Mono:pixelsize=16:Bold:antialias=true,xft:DejaVu Sans Mono:pixelsize=13:Bold:antialias=true

I went ahead and disabled all keybinds in i3 that include the cursor keys but that doesn't fix it.

I couldn't find any default keybinds for either of the components that seem relevant.

If I override the key-combinations in .Xdefaults then the behaviour stops for neovim in rxvt terminal and nothing at all happens:

URxvt.keysym.C-Left: command:\000
URxvt.keysym.C-Right: command:\000
URxvt.keysym.C-Top: command:\000
Rxvt.keysym.C-Down: command:\000

Frankly, I'm out of ideas what this could be.... Thanks

Upvotes: 1

Views: 70

Answers (0)

Related Questions