This commit is contained in:
Filipe Azevedo 2026-01-29 11:02:27 +11:00 committed by GitHub
commit 8565f1832a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
9 changed files with 247 additions and 22 deletions

View file

@ -98,6 +98,16 @@ void container_resize_tiled(struct sway_container *parent, uint32_t axis,
struct sway_container *container_find_resize_parent(struct sway_container *con,
uint32_t edge);
// Keysym to keycode translation (used by bind.c and keyboard.c)
struct keycode_matches {
xkb_keysym_t keysym;
xkb_keycode_t keycode;
int count;
};
void find_keycode(struct xkb_keymap *keymap, xkb_keycode_t keycode, void *data);
struct keycode_matches get_keycode_for_keysym(xkb_keysym_t keysym);
/**
* Handlers shared by exec and exec_always.
*/
@ -168,6 +178,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.
*/
@ -504,6 +515,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;