warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
21.37k stars 373 forks source link

CTRL / Command keys not passing through when using Karbiner #2182

Open michaeldrob opened 1 year ago

michaeldrob commented 1 year ago

Discord username (optional)

No response

Describe the bug

I am using Karabiner Elements 14.10 as a way to remap some keys from my windows keyboard. For instance, I use CTRL+C instead of Command+C to copy. When in Warp, the Command and Control keys don't seem to alway work. For instance, in the Nano editor, CTRL+X should exit, however in Warp, it simply types an "x". CTRL / Command get stripped. I tried other editors like micro and I get a similar issue. Interestingly, CTRL + Q does work in Micro. If I turn off the key translation in Karabiner, then everything seem to work ok.

To Reproduce

Install Karabiner Elements and install the PC-Style shortcuts Open Warp, use the nano editor to open any file try to quit by hitting CTRL + X

Expected behaviour

Key combinations should pass through to the terminal

Screenshots

No response

Operating System

MacOS

OS Version

13.0.1

Shell Version

zsh 5.8.1 (x86_64-apple-darwin22.0)

Warp Version

v0.2022.11.14.14.55.stable_01

Additional context

No response

Does this block you from using Warp daily?

Yes

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

No response

elviskahoro commented 1 year ago

I think the underlying issue might be the same as the lack of support for some international layouts. I don't think this would get fixed soon but I'll def update this issue once there is progress

leolozes commented 1 year ago

Same problem here, it's completely impossible to interrupt a command since ctrl+c or ctrl+z are not triggered.

Plus, in the Configure Keyboard Shortcuts settings panel, command and ctrl are behaving as the same key when trying to remap a keybinding. So it looks like ctrl is never triggered.

michaeldrob commented 1 year ago

FYI: I ended up putting an exception into karabiner to make this work. In your karabiner.json, add "^dev\\.warp\\.Warp\\-Stable$" to the bundle_identifiers array under "PC-Style Coopy/Paste/Cut" in the manipulators/conditions sections for all the keys necessary. If you have some other rules that intercept the key combinations, add that string to those.

elviskahoro commented 1 year ago

@leolozes @michaeldrob i think this was fixed can u check and see?

nrbrttth commented 1 year ago

@elviskahoro the issue still persists on version v0.2023.06.13.08.03.stable_03

leolozes commented 1 year ago

I have found another workaround: if you press CTRL+C with both left and right control pressed, it works :)