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

CTRL + ALT is not always interpreted as ALT GR on Windows #4052

Open
fredizzimo opened this issue Dec 22, 2024 · 0 comments
Open

CTRL + ALT is not always interpreted as ALT GR on Windows #4052

fredizzimo opened this issue Dec 22, 2024 · 0 comments
Labels
B - bug Dang, that shouldn't have happened DS - windows

Comments

@fredizzimo
Copy link

Description

See neovide/neovide#2899 for the full description

But in short, on a Nordic layout ctrl + alt + 2 sends ctr + alt + @, while ctrl + alt + 3 correctly sends just £ as it should.

Logs from Neovide
TRACE [neovide::window::keyboard_manager] Modifiers { state: ModifiersState(ALT), pressed_mods: ModifiersKeys(0x0) }
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        AltLeft,
    ),
    logical_key: Named(
        Alt,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: false,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Alt,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] Modifiers { state: ModifiersState(CONTROL | ALT), pressed_mods: ModifiersKeys(0x0) }
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: false,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: true,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: true,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: true,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: true,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: true,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: true,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: true,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        Digit2,
    ),
    logical_key: Character(
        "@",
    ),
    text: Some(
        "@",
    ),
    location: Standard,
    state: Pressed,
    repeat: false,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: Some(
            "@",
        ),
        key_without_modifiers: Character(
            "2",
        ),
    },
}
TRACE [neovide::window::keyboard_manager] Key pressed <C-M-@> ModifiersState(CONTROL | ALT)
TRACE [neovide::channel_utils] UIComand Serial(Keyboard("<C-M-@>"))
TRACE [neovide::bridge::ui_commands] In Serial Command
TRACE [neovide::bridge::ui_commands] Keyboard Input Sent: <C-M-@>
TRACE [neovide::bridge::handler] Neovim notification: "redraw"
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 3, row: 0, column_start: 0, cells: [GridLineCell { text: " ", highlight_id: Some(1), repeat: Some(12) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 1, row: 32, column_start: 84, cells: [GridLineCell { text: "0", highlight_id: Some(36), repeat: None }, GridLineCell { text: "-", highlight_id: None, repeat: None }, GridLineCell { text: "1", highlight_id: None, repeat: None }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 3, row: 0, column_start: 89, cells: [GridLineCell { text: "~", highlight_id: Some(1), repeat: None }, GridLineCell { text: "@", highlight_id: None, repeat: None }, GridLineCell { text: "", highlight_id: None, repeat: None }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 3, row: 0, column_start: 89, cells: [GridLineCell { text: " ", highlight_id: Some(1), repeat: Some(3) }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(0) }] }
TRACE [neovide::channel_utils] neovim_handler ModeChange { mode: Normal, mode_index: 0 }
TRACE [neovide::channel_utils] neovim_handler Flush
TRACE [neovide::editor] Image flushed
TRACE [neovide::editor] send_batch
TRACE [neovide::window::keyboard_manager] Modifiers { state: ModifiersState(CONTROL | ALT), pressed_mods: ModifiersKeys(0x0) }
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        ControlLeft,
    ),
    logical_key: Named(
        Control,
    ),
    text: None,
    location: Left,
    state: Pressed,
    repeat: false,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: None,
        key_without_modifiers: Named(
            Control,
        ),
    },
}
TRACE [neovide::window::keyboard_manager] KeyEvent {
    physical_key: Code(
        Digit3,
    ),
    logical_key: Character(
        "£",
    ),
    text: Some(
        "£",
    ),
    location: Standard,
    state: Pressed,
    repeat: false,
    platform_specific: KeyEventExtra {
        text_with_all_modifers: Some(
            "£",
        ),
        key_without_modifiers: Character(
            "3",
        ),
    },
}
TRACE [neovide::window::keyboard_manager] Key pressed <C-M-£> ModifiersState(CONTROL | ALT)
TRACE [neovide::channel_utils] UIComand Serial(Keyboard("<C-M-£>"))
TRACE [neovide::bridge::ui_commands] In Serial Command
TRACE [neovide::bridge::ui_commands] Keyboard Input Sent: <C-M-£>
TRACE [neovide::bridge::handler] Neovim notification: "redraw"
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 0, column_start: 0, cells: [GridLineCell { text: "£", highlight_id: Some(0), repeat: None }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 10, column_start: 34, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(32) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 12, column_start: 28, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(44) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 13, column_start: 38, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(23) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 15, column_start: 27, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(46) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 16, column_start: 27, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(46) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 17, column_start: 27, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(46) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 18, column_start: 27, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(46) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 20, column_start: 26, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(47) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 22, column_start: 35, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(29) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 2, row: 23, column_start: 27, cells: [GridLineCell { text: " ", highlight_id: Some(12), repeat: Some(46) }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 1, row: 32, column_start: 10, cells: [GridLineCell { text: "[", highlight_id: Some(36), repeat: None }, GridLineCell { text: "+", highlight_id: None, repeat: None }, GridLineCell { text: "]", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: Some(36), repeat: Some(69) }, GridLineCell { text: "1", highlight_id: None, repeat: None }, GridLineCell { text: ",", highlight_id: None, repeat: None }, GridLineCell { text: "3", highlight_id: None, repeat: None }, GridLineCell { text: "-", highlight_id: None, repeat: None }, GridLineCell { text: "2", highlight_id: None, repeat: None }] }
TRACE [neovide::channel_utils] neovim_handler WindowViewport { grid: 2, top_line: 0.0, bottom_line: 2.0, current_line: 0.0, current_column: 2.0, line_count: Some(1.0), scroll_delta: Some(0.0) }
TRACE [neovide::channel_utils] neovim_handler CursorGoto { grid: 2, row: 0, column: 1 }
TRACE [neovide::channel_utils] neovim_handler Flush
TRACE [neovide::editor] Image flushed
TRACE [neovide::editor] send_batch

Note that there's a similar but almost opposite bug, that when pressing ctrl + altgr the ctrl is not reported when it should

Windows version

Windows 11

Winit version

0.29.15

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B - bug Dang, that shouldn't have happened DS - windows
Development

No branches or pull requests

1 participant