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

Insert key doesnt reported to rust programs #913

Closed
og900aero opened this issue Aug 15, 2024 · 1 comment
Closed

Insert key doesnt reported to rust programs #913

og900aero opened this issue Aug 15, 2024 · 1 comment

Comments

@og900aero
Copy link

Describe the bug
I use yazi file manager https://github.com/sxyazi/yazi
I want to use Insert key for any function, but Yazi doesnt receives key events from crossterm.
The Yazi's developer thinks this is a crossterm's bug: https://github.com/sxyazi/yazi/issues/1485
The insert key is working fine. Xev program reported the following, when I press the insert key:

KeyPress event, serial 33, synthetic NO, window 0x1e00001,
    root 0x558, subw 0x0, time 1635077, (21,3), root:(988,565),
    state 0x0, keycode 90 (keysym 0xff9e, KP_Insert), same_screen YES,
    XLookupString gives 0 bytes: 
    XmbLookupString gives 0 bytes: 
    XFilterEvent returns: False

KeyRelease event, serial 33, synthetic NO, window 0x1e00001,
    root 0x558, subw 0x0, time 1635205, (21,3), root:(988,565),
    state 0x0, keycode 90 (keysym 0xff9e, KP_Insert), same_screen YES,
    XLookupString gives 0 bytes: 
    XFilterEvent returns: False

OS
Debian 12

Terminal/Console
st 0.9.1

@joshka
Copy link
Collaborator

joshka commented Aug 20, 2024

The events reported in a window environment are different from those reported in a terminal emulator. Using xev creates a window to listen for key events as I understand it. The supported events are often even different in each terminal emulator. For background see https://sw.kovidgoyal.net/kitty/keyboard-protocol/ and http://www.leonerd.org.uk/hacks/fixterms/

You may be able to get this to work in some terminals (but not all) by turning on the keyboard enhancement flags - this would be something that yazi would have to do (and it still may not solve your problem).

You may be able to configure your terminal to do something special with Insert however and then configure yazi to recognize that.

I'm closing this as a duplicate of #685 - you can add a comment there to help track this, but given this is in the keys not really supported by default you might be out of luck for really doing anything useful.

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