alacritty: Cannot bind to subtract anymore

Which operating system does the issue occur on?

Linux

If on linux, are you using X11 or Wayland?

X11


The following config doesn’t work anymore on my machine:

 - { key: Subtract, mods: Control|Shift, action: DecreaseFontSize       }
glutin event: DeviceEvent { device_id: DeviceId(X(DeviceId(10))), event: Key(KeyboardInput { scancode: 29, state: Pressed, virtual_keycode: Some(LControl), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } }) }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(90177539))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 29, state: Pressed, virtual_keycode: Some(LControl), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
glutin event: DeviceEvent { device_id: DeviceId(X(DeviceId(10))), event: Key(KeyboardInput { scancode: 42, state: Pressed, virtual_keycode: Some(LShift), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } })}
glutin event: WindowEvent { window_id: WindowId(X(WindowId(90177539))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 42, state: Pressed, virtual_keycode: Some(LShift), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
glutin event: DeviceEvent { device_id: DeviceId(X(DeviceId(10))), event: Key(KeyboardInput { scancode: 12, state: Pressed, virtual_keycode: Some(Subtract), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } }) }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(90177539))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 12, state: Pressed, virtual_keycode: None, modifiers: ModifiersState { shift: true, ctrl: true, alt: false, logo: false } } } }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(90177539))), event: ReceivedCharacter('\u{1f}') }
glutin event: Awakened
glutin event: DeviceEvent { device_id: DeviceId(X(DeviceId(10))), event: Key(KeyboardInput { scancode: 12, state: Released, virtual_keycode: Some(Subtract), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false }}) }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(90177539))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 12, state: Released, virtual_keycode: None, modifiers: ModifiersState { shift: true, ctrl: true, alt: false, logo: false } } } }
glutin event: DeviceEvent { device_id: DeviceId(X(DeviceId(10))), event: Key(KeyboardInput { scancode: 29, state: Released, virtual_keycode: Some(LControl), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false }}) }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(90177539))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 29, state: Released, virtual_keycode: Some(LControl), modifiers: ModifiersState { shift: true, ctrl: true, alt: false, logo: false } } } }
glutin event: DeviceEvent { device_id: DeviceId(X(DeviceId(10))), event: Key(KeyboardInput { scancode: 42, state: Released, virtual_keycode: Some(LShift), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } }) }
glutin event: WindowEvent { window_id: WindowId(X(WindowId(90177539))), event: KeyboardInput { device_id: DeviceId(X(DeviceId(3))), input: KeyboardInput { scancode: 42, state: Released, virtual_keycode: Some(LShift), modifiers: ModifiersState { shift: true, ctrl: false, alt: false, logo: false } } } }

Is there something I can do to help debug?

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 19 (15 by maintainers)

Most upvoted comments

Hm, I’m running into the same issue here … and while trying to understand what the actual problem seems to be in winit and glutin … I found that the following change in my config simply “fixed” the problem:

- { key: Minus, mods: Control, action: DecreaseFontSize       }

While Subtract doesn’t seem to work anymore, just changing it to Minus did the trick.

I’ve reported it upsteam in tomaka/glutin#979 for now. They probably know more about this than me.

Note that with the recent introduction of keycodes instead of named keys, it’s also possible to use those for mappings. So it should always be possible to map every key, no matter if it’s recognized or not.

To summarize the current situation, this issue appears to be related to winit issue https://github.com/tomaka/winit/issues/600. This is being tracked on glutin as https://github.com/tomaka/glutin/issues/979. Our own issue https://github.com/jwilm/alacritty/issues/1054 is due to the same underlying cause.