add keybind remap

This commit is contained in:
Filipe Azevedo 2025-11-09 23:10:38 +00:00
parent 055be4ec35
commit 6e983f6943
No known key found for this signature in database
8 changed files with 223 additions and 10 deletions

View file

@ -168,6 +168,7 @@ sway_cmd cmd_popup_during_fullscreen;
sway_cmd cmd_primary_selection;
sway_cmd cmd_reject;
sway_cmd cmd_reload;
sway_cmd cmd_remap;
sway_cmd cmd_rename;
sway_cmd cmd_resize;
sway_cmd cmd_scratchpad;

View file

@ -94,6 +94,17 @@ struct sway_gesture_binding {
char *command;
};
/**
* A key remap rule for transforming key combinations
*/
struct sway_key_remap {
uint32_t from_modifiers;
xkb_keysym_t from_keysym;
uint32_t to_modifiers;
xkb_keysym_t to_keysym;
char *app_id;
};
/**
* Focus on window activation.
*/
@ -498,6 +509,7 @@ struct sway_config {
list_t *criteria;
list_t *no_focus;
list_t *active_bar_modifiers;
list_t *key_remaps;
struct sway_mode *current_mode;
struct bar_config *current_bar;
uint32_t floating_mod;