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

Hyper Key #13891

Open
samyakbardiya opened this issue Feb 6, 2021 · 8 comments
Open

Hyper Key #13891

samyakbardiya opened this issue Feb 6, 2021 · 8 comments
Labels
enhancement feature request

Comments

@samyakbardiya
Copy link

  • nvim --version: v0.4.4
  • Operating system/version: Arch Linux v5.10.12
  • Terminal name/version: st v0.8.4
  • $TERM: st-256color

I want to map my binding using Hyper Key

recently I came across an option of setxbmap

setxkbmap -option 'ctrl:swapcaps_hyper'

what this command does is that it makes the Caps Lock as Ctrl, and Ctrl as Hyper.

so now I want to bind some things in the neovim to the new Hyper key, but sadly vim don't support Hyper key and so do neovim.

they only supports:

  • shift as <S-...>
  • control as <C-...>
  • alt as <A-...>
  • meta as <M-...>
  • super as <D-...>

so I was hoping if neovim can add the support of Hyper key :)
after doing some research found that Emacs support it, so I was guessing then neovim can too.

@samyakbardiya samyakbardiya added the enhancement feature request label Feb 6, 2021
@pta2002
Copy link

pta2002 commented Feb 9, 2021

I guess this would depend if the hyper key is passed on to the terminal. Does emacs support it on non-GUI mode?

@samyakbardiya
Copy link
Author

got your point, the Emacs in terminal does not support hyper key.

that's sad :(

@pta2002
Copy link

pta2002 commented Feb 12, 2021

I guess the only way to implement this then would be to bypass the terminal and grab it from X/Wayland manually, but that'd be a whole lot of trouble. Maybe a way for GUI frontends to bind to it? Don't know if there's already a way to do that

@samyakbardiya
Copy link
Author

is there any application like xev but for tty ?

@bfredl
Copy link
Member

bfredl commented Feb 13, 2021

Adding yet another modifier flag to core like <H-x> wouldn't be difficult, but it is up to UI:s to actually detect the key from os/toolkit and assign it to this flag. I don't know of any terminal who support it unfortunately (personally I just use X11 terminals that support XIM/ibus/etc, then I can preprocess keyboard input as I like).

@pta2002
Copy link

pta2002 commented Feb 13, 2021

Does neovim already handle that kind of terminal? If it does it probably wouldn't be too hard to support this

@bfredl
Copy link
Member

bfredl commented Feb 13, 2021

well no, but if such a terminal exist it wouldn't be hard, just tell us what sequences it uses 😅

@zeertzjq
Copy link
Member

zeertzjq commented Apr 19, 2021

Kitty recently introduced a new keyboard protocol that supports representing many more keys and key combinations. (https://sw.kovidgoyal.net/kitty/keyboard-protocol.html) I just opened issue #14400 for that.

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

No branches or pull requests

4 participants