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

Dvorak-QWERTY keyboard layout no longer respecting QWERTY layer #7742

Open
tulgeywood opened this issue Feb 16, 2024 · 11 comments
Open

Dvorak-QWERTY keyboard layout no longer respecting QWERTY layer #7742

tulgeywood opened this issue Feb 16, 2024 · 11 comments

Comments

@tulgeywood
Copy link

When using the Dvorak-QWERTY keyboard layout in macOS, holding the command key remaps back to QWERTY so that you can leverage the normal locations for keyboard shortcuts. Currently Alacritty is ignoring this and just returning the value of Command with the Dvorak key.

System

OS: macOS
Version: 0.13.1

Logs

Crashes: STDERR, STDOUT
Font/Terminal size: alacritty -vv
Keyboard and bindings: [22.520989958s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5653978656)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(Comma), logical_key: Character("w"), text: Some("w"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: Some(","), key_without_modifiers: Character("w") } }, is_synthetic: false } }

@chrisduerr
Copy link
Member

That's not the default behavior on macOS though, is it? At least it wasn't last time I used it. Using command to go back to qwerty just sounds wrong to me.

@tulgeywood
Copy link
Author

tulgeywood commented Feb 17, 2024

It’s a standard keyboard layout built into macOS distinct from just the Dvorak layout. It’s so you can still use keyboard shortcuts in their original position.

@chrisduerr
Copy link
Member

Honestly if that's the case then I don't understand why macOS would even send us the dvorak keys.

@tulgeywood
Copy link
Author

So i just ran back through your releases. Everything was working as expected in 0.13.0. The behavior changed in 0.13.1-rc1.

I understand this will be pretty low on your priority list but appreciate you even responding so far. I figure if push comes to shove I can just add a whole bunch of keybinding changes to handle this directly. But would be lovely if it handled things natively.

@chrisduerr
Copy link
Member

Huh good to know this is a regression, my assumption would be that f5ed831 broke this then.

Could you confirm this? It's probably easiest by just bisecting the v0.13 branch from v0.13.0 onwards. But I'm pretty confident this is the breaking change so could also just compare this against parent.

@kchibisov
Copy link
Member

I guess the issue is that we use character without modifier, and it means that the character is without a Command thus Command translation is not applied.

Maybe we should exclude Command.

I think 85d85e4 broke it?

@tulgeywood
Copy link
Author

I cloned the repo and modified alacritty/src/input/keyboard.rs to put if cfg!(target_os = "macos") && mods.alt_key() { back. I then ran make app and launched target/release/osx/Alacritty.app. The issue is still present.

@kchibisov
Copy link
Member

Could you post --print-events from 0.13 and from 0.13.1?

@tulgeywood
Copy link
Author

In what context am I running --print-events?

@kchibisov
Copy link
Member

You press the same binding and communicate what you've pressed/expected?

@tulgeywood
Copy link
Author

tulgeywood commented Feb 17, 2024

Sorry, took me a second to realize you meant launch Alacritty with that as an argument. This is me doing Command V in both versions.

0.13.0
[35.074738708s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5208595472)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(SuperLeft), logical_key: Named(Super), text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: None, key_without_modifiers: Named(Super) } }, is_synthetic: false } }
[37.382578250s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5208595472)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(KeyV), logical_key: Character("v"), text: Some("v"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: Some("v"), key_without_modifiers: Character("k") } }, is_synthetic: false } }
[37.446169541s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5208595472)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(KeyV), logical_key: Character("v"), text: None, location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: Some("v"), key_without_modifiers: Character("k") } }, is_synthetic: false } }
[38.531330625s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5208595472)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(SuperLeft), logical_key: Named(Super), text: None, location: Left, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: None, key_without_modifiers: Named(Super) } }, is_synthetic: false } }

0.13.1
[8.584043792s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5627749712)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(SuperLeft), logical_key: Named(Super), text: None, location: Left, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: None, key_without_modifiers: Named(Super) } }, is_synthetic: false } }
[8.766703458s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5627749712)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(KeyV), logical_key: Character("k"), text: Some("k"), location: Standard, state: Pressed, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: Some("v"), key_without_modifiers: Character("k") } }, is_synthetic: false } }
[8.897749958s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5627749712)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(KeyV), logical_key: Character("k"), text: None, location: Standard, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: Some("v"), key_without_modifiers: Character("k") } }, is_synthetic: false } }
[9.213725750s] [INFO ] [alacritty] winit event: WindowEvent { window_id: WindowId(WindowId(5627749712)), event: KeyboardInput { device_id: DeviceId(DeviceId), event: KeyEvent { physical_key: Code(SuperLeft), logical_key: Named(Super), text: None, location: Left, state: Released, repeat: false, platform_specific: KeyEventExtra { text_with_all_modifiers: None, key_without_modifiers: Named(Super) } }, is_synthetic: false } }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants