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

Some keybind don’t work on some french layout #1435

Closed
Geobert opened this issue Aug 7, 2024 · 9 comments
Closed

Some keybind don’t work on some french layout #1435

Geobert opened this issue Aug 7, 2024 · 9 comments
Labels
bug Something isn't working upstream

Comments

@Geobert
Copy link

Geobert commented Aug 7, 2024

What system are you running Yazi on?

Windows

What terminal are you running Yazi in?

wezterm

yazi --debug output

azi
    Version: 0.3.0 (a9d2d9c 2024-08-07)
    Debug  : false
    OS     : windows-x86_64 (windows)

Ya
    Version: 0.3.0

Emulator
    Emulator.via_env: ("xterm-256color", "WezTerm")
    Emulator.via_csi: Ok(Unknown([]))
    Emulator.detect : WezTerm

Adapter
    Adapter.matches: Iterm2

Desktop
    XDG_SESSION_TYPE: None
    WAYLAND_DISPLAY : None
    DISPLAY         : None

SSH
    shared.in_ssh_connection: false

WSL
    /proc/sys/fs/binfmt_misc/WSLInterop: false

Variables
    SHELL              : None
    EDITOR             : None
    YAZI_FILE_ONE      : Some("C:\\Users\\Geob\\scoop\\apps\\git\\current\\usr\\bin\\file.exe")
    YAZI_CONFIG_HOME   : None
    ZELLIJ_SESSION_NAME: None

Text Opener
    default: Some(Opener { run: "code %*", block: false, orphan: true, desc: "code", for_: None, spread: true })
    block  : Some(Opener { run: "code -w %*", block: true, orphan: false, desc: "code (block)", for_: None, spread: true })

tmux
    TMUX   : false
    Version: program not found

Dependencies
    file             : 5.45
    ueberzugpp       : program not found
    ffmpegthumbnailer: program not found
    magick           : 7.1.1-36
    fzf              : 0.54.3
    fd               : 10.1.0
    rg               : 14.1.0
    chafa            : program not found
    zoxide           : 0.9.4
    7z               : 24.07
    7zz              : program not found
    jq               : 1.7.1


--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "C:\\Users\\Geob\\AppData\\Roaming\\yazi\\state" directory.

Did you try the latest nightly build to see if the problem got fixed?

Yes, and I updated the debug information above (yazi --debug) to the nightly that I tried

Describe the bug

I’m using a french layout named Ergo‑L and to type / I use AltGr+i but it doesn’t trigger the search.

Same for the ? on the AltGr layer. the direct ? work though

Minimal reproducer

Install Ergo‑L and do / using AltGr+l (l in qwerty position = `i in ergo‑l)

Anything else?

No response

@Geobert Geobert added the bug Something isn't working label Aug 7, 2024
@sxyazi
Copy link
Owner

sxyazi commented Aug 8, 2024

Please apply this patch and build Yazi in debug mode, then check the log file to see what key was reported

--- yazi/yazi-fm/src/app/app.rs
+++ yazi/yazi-fm/src/app/app_new.rs
@@ -81,7 +81,10 @@
 	fn dispatch_render(&mut self) { NEED_RENDER.store(true, Ordering::Relaxed); }
 
 	#[inline]
-	fn dispatch_key(&mut self, key: KeyEvent) { Router::new(self).route(Key::from(key)); }
+	fn dispatch_key(&mut self, key: KeyEvent) {
+		tracing::error!(?key);
+		Router::new(self).route(Key::from(key));
+	}
 
 	#[inline]
 	fn dispatch_paste(&mut self, str: String) {

@sxyazi sxyazi added the waiting on op Waiting for more information from the original poster label Aug 8, 2024
@Geobert
Copy link
Author

Geobert commented Aug 8, 2024

I will do that after work. However, a friend told me that as yazi uses crossterm, it might be this bug: crossterm-rs/crossterm#820

@github-actions github-actions bot removed the waiting on op Waiting for more information from the original poster label Aug 8, 2024
@Geobert
Copy link
Author

Geobert commented Aug 8, 2024

�[2m2024-08-08T16:52:24.319779Z�[0m �[31mERROR�[0m �[1;31myazi::app::app�[0m�[31m: �[1;31mkey�[0m�[31m: KeyEvent { code: Char('/'), modifiers: KeyModifiers(CONTROL | ALT), kind: Press, state: KeyEventState(0x0) }�[0m
    �[2;3mat�[0m yazi-fm\src\app\app.rs:93

Seems to be the bug I linked

@sxyazi
Copy link
Owner

sxyazi commented Aug 8, 2024

Does it work if you use something like <C-A-/>?

@sxyazi sxyazi added the waiting on op Waiting for more information from the original poster label Aug 8, 2024
@Geobert
Copy link
Author

Geobert commented Aug 8, 2024

it does! That will do I think :)

@github-actions github-actions bot removed the waiting on op Waiting for more information from the original poster label Aug 8, 2024
@sxyazi
Copy link
Owner

sxyazi commented Aug 9, 2024

Glad to see it worked! I recommend using this workaround until the issue is fixed upstream.

Yazi just passes through events from crossterm as they are, without any extra processing, so there's not much we can do about it. But this also means that once it's fixed upstream, Yazi will automatically be good to go without needing any code changes.

@sxyazi sxyazi closed this as completed Aug 9, 2024
@sxyazi sxyazi added the upstream label Aug 9, 2024
@Geobert
Copy link
Author

Geobert commented Aug 12, 2024

Unexpected issue related to this: I can’t create directories as I can’t input / 😅

@sxyazi
Copy link
Owner

sxyazi commented Aug 12, 2024

Check out https://github.com/Sonico98/mkdir.yazi

This plugin without the need to type /

Copy link

I'm going to lock this issue because it has been closed for 30 days. ⏳
This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Sep 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working upstream
Projects
None yet
Development

No branches or pull requests

2 participants