Skip to content

MacOS not sending ReceivedCharacter event #1267

@chrisduerr

Description

@chrisduerr

It has been reported to Alacritty that on macOS, specific key combinations do not always emit ReceivedCharacter events on macOS.

The specific example was Ctrl+Q and it appears that while the first press does not emit an event, the second does.

This has been reported to Alacritty in alacritty/alacritty#1359 and here's an excerpt from the relevant event log (full log can be found in the issue):

[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 62, state: Pressed, virtual_keycode: Some(RControl), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 12, state: Pressed, virtual_keycode: Some(Q), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 12, state: Released, virtual_keycode: Some(Q), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 62, state: Released, virtual_keycode: Some(RControl), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }
[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 62, state: Pressed, virtual_keycode: Some(RControl), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 12, state: Pressed, virtual_keycode: Some(Q), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: ReceivedCharacter('\u{11}') }
[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 12, state: Released, virtual_keycode: Some(Q), modifiers: ModifiersState { shift: false, ctrl: true, alt: false, logo: false } } } }
[2019-11-08 10:53] [INFO] glutin event: WindowEvent { window_id: WindowId(Id(140382647460256)), event: KeyboardInput { device_id: DeviceId(DeviceId), input: KeyboardInput { scancode: 62, state: Released, virtual_keycode: Some(RControl), modifiers: ModifiersState { shift: false, ctrl: false, alt: false, logo: false } } } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    B - bugDang, that shouldn't have happenedC - needs investigationIssue must be confirmed and researchedDS - appkitAffects the AppKit/macOS backend

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions