refactor: remove unused mapPress function in move_to_char
This commit is contained in:
parent
d4d8ad4dd5
commit
0b6d820153
1 changed files with 0 additions and 19 deletions
|
@ -77,25 +77,6 @@ pub fn receive(_: *Self, _: tp.pid_ref, _: tp.message) error{Exit}!bool {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
fn mapPress(self: *Self, keypress: u32, egc: u32, modifiers: u32) tp.result {
|
|
||||||
switch (keypress) {
|
|
||||||
key.LSUPER, key.RSUPER => return,
|
|
||||||
key.LSHIFT, key.RSHIFT => return,
|
|
||||||
key.LCTRL, key.RCTRL => return,
|
|
||||||
key.LALT, key.RALT => return,
|
|
||||||
else => {},
|
|
||||||
}
|
|
||||||
return switch (modifiers) {
|
|
||||||
mod.SHIFT => if (!key.synthesized_p(keypress)) self.execute_operation(egc) else self.cancel(),
|
|
||||||
0 => switch (keypress) {
|
|
||||||
key.ESC => self.cancel(),
|
|
||||||
key.ENTER => self.cancel(),
|
|
||||||
else => if (!key.synthesized_p(keypress)) self.execute_operation(egc) else self.cancel(),
|
|
||||||
},
|
|
||||||
else => self.cancel(),
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
fn execute_operation(self: *Self, c: u32) void {
|
fn execute_operation(self: *Self, c: u32) void {
|
||||||
const cmd = switch (self.direction) {
|
const cmd = switch (self.direction) {
|
||||||
.left => switch (self.operation) {
|
.left => switch (self.operation) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue