Keybind for cycling through layout engines #797
Answered
by
dalyIsaac
sun-wise-man
asked this question in
Q&A
-
Is there a way to set up keybind for cycling layout engine? |
Beta Was this translation helpful? Give feedback.
Answered by
dalyIsaac
Jan 21, 2024
Replies: 1 comment 2 replies
-
I've just made a new release with two commands built in, as I'm planning to update how this works a bit in a future release. With the new built-in commands, you can do: context.KeybindManager.SetKeybind("whim.core.cycle_layout_engine.next", new Keybind(KeyModifiers.LControl | KeyModifiers.LShift | KeyModifiers.LAlt, VIRTUAL_KEY.VK_L));
context.KeybindManager.SetKeybind("whim.core.cycle_layout_engine.previous", new Keybind(KeyModifiers.LControl | KeyModifiers.LShift | KeyModifiers.LAlt | KeyModifiers.LWin, VIRTUAL_KEY.VK_L)); If you were planning to create custom commands, you'd do something like this (for now, until #796 is merged): context.CommandManager.Add("activate_next_layout", "Activate next layout", () => context.WorkspaceManager.ActiveWorkspace.CycleLayoutEngine());
context.CommandManager.Add("activate_previous_layout", "Activate previous layout", () => context.WorkspaceManager.ActiveWorkspace.CycleLayoutEngine());
context.KeybindManager.SetKeybind("whim.custom.activate_next_layout", new Keybind(KeyModifiers.LControl | KeyModifiers.LShift | KeyModifiers.LAlt, VIRTUAL_KEY.VK_L));
context.KeybindManager.SetKeybind("whim.custom.activate_previous_layout", new Keybind(KeyModifiers.LControl | KeyModifiers.LShift | KeyModifiers.LAlt, VIRTUAL_KEY.VK_H)); |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
sun-wise-man
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I've just made a new release with two commands built in, as I'm planning to update how this works a bit in a future release.
With the new built-in commands, you can do:
If you were planning to create custom commands, you'd do something like this (for now, until #796 is merged):