Keyboard: fix key handling/eating logic
As noticed by leon-p, last refactorings made river send a release event to the client even if the press event has been eaten. In addition, the introduction of input method support means that we need to remember *why* we've eaten the key. Also make KeycodeSet more strict: i am not aware of any case when a keyboard could have the same key pressed twice (specifically, keyboard groups have this handled in wlroots), so make the behavior follow a smaller set of possible scenarios.
This commit is contained in:
@ -307,6 +307,7 @@ fn keyboardNotifyEnter(self: *Self, wlr_surface: *wlr.Surface) void {
|
||||
if (self.wlr_seat.getKeyboard()) |wlr_keyboard| {
|
||||
var keycodes = KeycodeSet{
|
||||
.items = wlr_keyboard.keycodes,
|
||||
.reason = .{.none} ** 32,
|
||||
.len = wlr_keyboard.num_keycodes,
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user