8

The kitty terminal emulator uses the shortcut Ctrl + Shift + R for window resizing. The shortcut is also used by bash for reversing the reverse-i-search direction.

First I tried to to remove the kitty shortcut by mapping it to no_op using

map ctrl+shift+r no_op

But then Ctrl + Shift + R inserts 4;6u instead of the shortcut being passed to the shell like it does in other terminals.

As second option I tried mapping the shortcut to discard_event using

map ctrl+shift+r discard_event

But then Ctrl + Shift + R behaves like no key was pressed at all.

Testcase:

  • Press Ctrl + R
  • Enter a term that appears multiple times in your bash history
  • Press Ctrl + R again to get to the next match
  • Press Ctrl + Shift + R to get to the previous match (this step fails in kitty)
allo
  • 1,248

2 Answers2

6

The actual way to unmap a shortcut is to set the key map to no_op. For example:

map ctrl+shift+r no_op

discard_event stops the event from propagating period, so the running program never receives it.

watzon
  • 179
-1

To unmap the keyboard shortcut defined by Kitty, try instead :

map ctrl+shift+r discard_event

lcheylus
  • 119