fix: match documented default bindings
This commit is contained in:
1 parent
3d8c7b0c4f
commit
3e692ba934
1 file changed
+3
-8
@@ -34,11 +34,8 @@ impl Ferese {
|
|||||||
return FilterResult::Intercept(());
|
return FilterResult::Intercept(());
|
||||||
}
|
}
|
||||||
|
|
||||||
let supported_modifiers = modifiers.logo
|
|
||||||
&& !modifiers.alt
|
|
||||||
&& !(modifiers.ctrl && modifiers.shift);
|
|
||||||
let symbol = keysym.modified_sym().raw();
|
let symbol = keysym.modified_sym().raw();
|
||||||
let direction = if supported_modifiers {
|
let direction = if modifiers.logo && !modifiers.ctrl && !modifiers.alt {
|
||||||
match symbol {
|
match symbol {
|
||||||
keysyms::KEY_h | keysyms::KEY_H => Some(Direction::Left),
|
keysyms::KEY_h | keysyms::KEY_H => Some(Direction::Left),
|
||||||
keysyms::KEY_j | keysyms::KEY_J => Some(Direction::Down),
|
keysyms::KEY_j | keysyms::KEY_J => Some(Direction::Down),
|
||||||
@@ -54,11 +51,9 @@ impl Ferese {
|
|||||||
if state == KeyState::Pressed {
|
if state == KeyState::Pressed {
|
||||||
data.intercepted_keys.insert(keycode);
|
data.intercepted_keys.insert(keycode);
|
||||||
|
|
||||||
if modifiers.ctrl && !modifiers.shift {
|
if modifiers.shift {
|
||||||
data.resize_direction(direction);
|
|
||||||
} else if modifiers.shift && !modifiers.ctrl {
|
|
||||||
data.move_direction(direction);
|
data.move_direction(direction);
|
||||||
} else if !modifiers.ctrl && !modifiers.shift {
|
} else {
|
||||||
data.focus_direction(direction);
|
data.focus_direction(direction);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user