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
Backslash key on Japanese Macs #848
Comments
You can see what key events kitty receives by running it as kitty --debug-keyboard |
Thanks, that's really helpful. Here's the output:
So if it's not recognized by glfw, am I out of luck? |
kitty has a mechanism to bind native keycodes as well, but it is only implemented for XKB (X11/Wayland). You could in theory implement it for cocoa as well, but that is a fair amount of work. See https://sw.kovidgoyal.net/kitty/conf.html#keyboard-shortcuts which talks about using XKB key names. You'd basically need to implement the key_for_native_key_name() function for cocoa in keys.c line number 226 Or you can try to investigate why glfw does not respect the system wide setting, relevant code is the keyDown function in glfw/coca_window.m |
Fast work, thanks a lot! I just had a quick test with the latest code, but still can't seem to get it to work. Mapping the yen/backlash key didn't seem to work, and I also tried mapping the Is there something else needed to get this working on macos? kitty.conf:
Output of x keypress with --debug-keyboard on:
|
oops, should be fine now. |
Working fine now, thanks! |
The backslash key on Japanese computers is usually set to produce a currency yen mark "¥" by default. We can remap this in the system settings to produce the backslash and not the yen mark:

This works for me system wide, but it does not work in kitty for some reason. Even with a blank config, kitty seems to produce
¥
instead of\
.I wonder if there's any way for kitty to respect the system wide option? I realise that you probably don't have access to a Japanese mac so it might not be worth the trouble.
Instead, can we use
map ... send_text
to work around this? I've tried a few times but can't seem to find the right keycode to input.Here's what I've tried in kitty.conf:
Here's the output of xev when pressing the ¥ key:
Here's the output of Key Codes when pressing the ¥ key:

How should I write that
map
command in kitty.conf?The text was updated successfully, but these errors were encountered: