mirror of
https://github.com/ghostty-org/ghostty.git
synced 2025-07-14 15:56:13 +03:00
gtk: get num_lock state for key events
GTK doesn't expose the num_lock state via the key press event, this must be obtained directly from the device. Set the num_lock state in the modifier mask. This also will never show up as a `consumed_mod`, so we don't bother setting it there. Signed-off-by: Tim Culverhouse <tim@timculverhouse.com>
This commit is contained in:
@ -1376,6 +1376,8 @@ fn keyEvent(
|
||||
|
||||
else => {},
|
||||
}
|
||||
const device = c.gdk_event_get_device(event);
|
||||
mods.num_lock = c.gdk_device_get_num_lock_state(device) == 1;
|
||||
break :mods mods;
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user