mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-16 08:46:08 +03:00
only handle non-printables on press/release, and BS is 0x7F
This commit is contained in:
@ -598,10 +598,11 @@ fn keyCallback(
|
||||
}
|
||||
|
||||
// Handle non-printable characters
|
||||
if (action == .press or action == .repeat) {
|
||||
const char: u8 = switch (@bitCast(u8, mods)) {
|
||||
// No modifiers pressed at all
|
||||
0 => @as(u8, switch (key) {
|
||||
.backspace => 0x08,
|
||||
.backspace => 0x7F,
|
||||
.enter => '\r',
|
||||
.tab => '\t',
|
||||
.escape => 0x1B,
|
||||
@ -645,6 +646,7 @@ fn keyCallback(
|
||||
win.queueWrite(&[1]u8{char}) catch |err|
|
||||
log.err("error queueing write in keyCallback err={}", .{err});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn focusCallback(window: glfw.Window, focused: bool) void {
|
||||
|
Reference in New Issue
Block a user