Not providing the correct information on Ctrl-[ and CTRL-] Czech keyboard on Windows
zbyna opened this issue · comments
Description
Discussion on Neovide
issue Ctrl-[
does not behave as Esc and CTRL-]
as jump to ctag on Czech keyboard on Windows led us to some doubts about whether lib provides correct information on these shortcuts on keyboard with Czech layout.
Shortcuts Ctrl-[
and Ctrl-]
work in plain Neovim
and Neovim QT
on Czech keyboard on Windows. When I use the same Neovim
version with Neovide
, above-mentioned shortcuts do not work.
Neovim
uses the terminal for the keyboard handling, and neovim-qt
uses qt. Neovide
uses winit
, and this appears to be a bug in that library, for not providing us the correct information.
Pressing Ctrl-[
(or FWIW Ctrl-]
) in Neovide
no longer works as expected (as Esc
, or goto tag
). It writes the Czech letters instead:
Ctrl-[
writes ú
,
Ctrl-]
writes )
.
which are the actual letters on the Czech layout at the corresponding keys.
Winit
should probably report [
and ]
, instead of (
and ú
.
What is your opinion?
Log from Neovide
:
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(
BracketRight,
),
logical_key: Character(
")",
),
text: Some(
")",
),
location: Standard,
state: Pressed,
repeat: false,
platform_specific: KeyEventExtra {
text_with_all_modifers: Some(
"\u{1d}",
),
key_without_modifiers: Character(
")",
),
},
}
TRACE [neovide::window::keyboard_manager] Key pressed <C-)> ModifiersState(CONTROL)
TRACE [neovide::channel_utils] UICommand Serial(Keyboard("<C-)>"))
TRACE [neovide::bridge::ui_commands] In Serial Command
TRACE [neovide::bridge::ui_commands] Keyboard Input Sent: <C-)>
TRACE [neovide::bridge::handler] Neovim notification: "redraw"
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 5, row: 0, column_start: 159, cells: [GridLineCell { text: ")", highlight_id: Some(130), repeat: None }] }
TRACE [neovide::channel_utils] neovim_handler Flush
TRACE [neovide::editor] Image flushed
TRACE [neovide::editor] send_batch
TRACE [neovide::renderer::fonts::caching_shaper] Shaping text: "/vimtut [1/1] )"
TRACE [neovide::bridge::handler] Neovim notification: "redraw"
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 5, row: 0, column_start: 159, cells: [GridLineCell { text: " ", highlight_id: Some(130), repeat: None }, GridLineCell { text: " ", highlight_id: Some(0), repeat: Some(0) }] }
TRACE [neovide::channel_utils] neovim_handler HighlightAttributesDefine { id: 532, style: Style { colors: Colors { foreground: Some(Color4f { r: 1.0, g: 1.0, b: 0.8784314, a: 1.0 }), background: Some(Color4f { r: 0.15686275, g: 0.30980393, b: 0.15686275, a: 1.0 }), special: None }, reverse: false, italic: false, bold: false, strikethrough: false, blend: 0, underline: None, infos: [HighlightInfo { kind: Syntax, ui_name: "", hi_name: "Identifier", id: 139 }, HighlightInfo { kind: Ui, ui_name: "Search", hi_name: "Search", id: 438 }] } }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 6, row: 8, column_start: 40, cells: [GridLineCell { text: "v", highlight_id: Some(532), repeat: None }, GridLineCell { text: "i", highlight_id: None, repeat: None }, GridLineCell { text: "m", highlight_id: None, repeat: None }, GridLineCell { text: "t", highlight_id: None, repeat: None }, GridLineCell { text: "u", highlight_id: None, repeat: None }, GridLineCell { text: "t", highlight_id: None, repeat: None }] }
TRACE [neovide::channel_utils] neovim_handler GridLine { grid: 1, row: 18, column_start: 158, cells: [GridLineCell { text: "6", highlight_id: Some(390), repeat: None }, GridLineCell { text: "/", highlight_id: None, repeat: None }, GridLineCell { text: "2", highlight_id: None, repeat: None }, GridLineCell { text: "0", highlight_id: None, repeat: None }, GridLineCell { text: "5", highlight_id: None, repeat: None }, GridLineCell { text: "☰", highlight_id: None, repeat: None }, GridLineCell { text: " ", highlight_id: None, repeat: None }, GridLineCell { text: "℅", highlight_id: None, repeat: None }, GridLineCell { text: ":", highlight_id: None, repeat: None }, GridLineCell { text: "2", highlight_id: None, repeat: None }, GridLineCell { text: "1", highlight_id: None, repeat: None }] }
TRACE [neovide::channel_utils] neovim_handler WindowViewport { grid: 6, top_line: 26.0, bottom_line: 44.0, current_line: 35.0, current_column: 6.0, line_count: Some(205.0), scroll_delta: Some(0.0) }
TRACE [neovide::channel_utils] neovim_handler CursorGoto { grid: 6, row: 9, column: 20 }
TRACE [neovide::channel_utils] neovim_handler Flush
TRACE [neovide::editor] Image flushed
TRACE [neovide::editor] send_batch
TRACE [neovide::renderer::rendered_window] Handling Viewport 6
TRACE [neovide::renderer::fonts::caching_shaper] Shaping text: "\u{e0a1}:36/205☰ ℅:21"
TRACE [neovide::renderer::fonts::caching_shaper] Shaping text: "R"
TRACE [neovide::window::keyboard_manager] KeyEvent {
physical_key: Code(
BracketRight,
),
logical_key: Character(
")",
),
text: None,
location: Standard,
state: Released,
repeat: false,
platform_specific: KeyEventExtra {
text_with_all_modifers: None,
key_without_modifiers: Character(
")",
),
},
}
TRACE [neovide::window::keyboard_manager] Modifiers { state: ModifiersState(0x0), pressed_mods: ModifiersKeys(0x0) }
TRACE [neovide::window::keyboard_manager] KeyEvent {
physical_key: Code(
ControlLeft,
),
logical_key: Named(
Control,
),
text: None,
location: Left,
state: Released,
repeat: false,
platform_specific: KeyEventExtra {
text_with_all_modifers: None,
key_without_modifiers: Named(
Control,
),
},
}
TRACE [neovide::channel_utils] UICommand Parallel(Quit)
TRACE [neovide::bridge::handler] Neovim request: "neovide.quit"
INFO [neovide::running_tracker] Quit with code 0: Quit from neovim
INFO [neovide::running_tracker] Quit neovim processed failed
DEBUG [neovide::settings::window_size] Saved Window Settings: {"window":{"Windowed":{"position":{"x":159,"y":150},"pixel_size":{"width":1708,"height":500},"grid_size":{"width":170,"height":22}}}}
DEBUG [neovide::settings::window_size] Saved Window Settings: {"window":{"Windowed":{"position":{"x":159,"y":150},"pixel_size":{"width":1708,"height":500},"grid_size":{"width":170,"height":22}}}}
Windows version
Microsoft Windows [Version 10.0.19045.2486]
Winit version
winit = { version = "=0.29.15", features = ["serde"] }