aboutsummaryrefslogtreecommitdiffstats
path: root/include/sway/input/keyboard.h
Commit message (Collapse)AuthorAge
* treewide: fix typosLibravatar Torstein Husebø2020-02-18
|
* seat_cmd_keyboard_grouping: change keymap to smartLibravatar Brian Ashworth2019-12-16
| | | | | | | | | | This removes `seat <seat> keyboard_grouping keymap` and replaces it with `seat <seat> keyboard_grouping smart`. The smart keyboard grouping will group based on both the keymap and repeat info. The reasoning for this is that deciding what the repeat info should be for a group is either arbitrary or non-deterministic when multiple keyboards in the group have repeat info configured (unless somehow exposed to the user in a reproducible uniquely identifiable fashion).
* Add support for wlr_keyboard_groupLibravatar Brian Ashworth2019-11-21
| | | | | | | | | | | | | | | | | A wlr_keyboard_group allows for multiple keyboard devices to be combined into one logical keyboard. This is useful for keyboards that are split into multiple input devices despite appearing as one physical keyboard in the user's mind. This adds support for wlr_keyboard_groups to sway. There are two keyboard groupings currently supported, which can be set on a per-seat basis. The first keyboard grouping is none, which disables all grouping and provides no functional change. The second is keymap, which groups the keyboard devices in the seat by their keymap. With this grouping, the effective layout and repeat info is also synced across keyboard devices in the seat. Device specific bindings will still be executed as normal, but everything else related to key and modifier events will be handled by the keyboard group's keyboard.
* input/keyboard: send released only if pressed sentLibravatar Brian Ashworth2019-08-20
| | | | | | | | | | This keeps track of whether surfaces received a key press event and will only send a key release event if the pressed event was sent. This also requires changing the keycodes that are sent via wl_keyboard_enter to only include those that were previously sent. This makes it so surfaces do not receive key release events for keys that they never received a key press for and makes it so switching focus doesn't leak keycodes that were consumed by bindings.
* ipc: add an input eventLibravatar Brian Ashworth2019-07-23
| | | | | | | | | This adds an ipc event related to input devices. Currently the following changes are supported: - added: when an input device becomes available - removed: when an input device is no longer available - xkb_keymap_changed: (keyboards only) the keymap changed - xkb_layout_changed: (keyboards only) the effective layout changed
* commands/input: perform basic keymap validationLibravatar Brian Ashworth2019-06-09
| | | | | | | | | | | | | Before the delta input config is stored, this attempts to compile a keymap with it. If the keymap fails to compile, then the first line of the xkbcommon log entry will be included with a `CMD_FAILURE`, the entire xkbcommon log entry will be included in the sway error log, and the delta will not be stored. This only handles basic issues such as a layouts not existing. This will NOT catch more complex issues such as when a variant does exist, but not for the given layout (ex: `azerty` is a valid variant, but the `us` layout does not have a `azerty` variant).
* input/keyboard: attempt default keymap on failureLibravatar Brian Ashworth2019-05-14
| | | | | | | | | | | | | This attempts to use the default keymap when the one defined in the input config fails to compile. The goal is to make it so the keyboard is always in a usable state, even if it is not the user's requested settings as usability is more important. This also removes the calls to `getenv` for the `XKB_DEFAULT_*` family of environment variables. The reasoning is libxkbcommon will fallback to using those (and then the system defaults) when any of the rule names are `NULL` or an empty string anyway so there is no need for sway to duplicate the efforts.
* Move sway-specific functions in common/util.c into sway/Libravatar M Stoeckl2019-01-21
| | | | | | Modifier handling functions were moved into sway/input/keyboard.c; opposite_direction for enum wlr_direction into sway/tree/output.c; and get_parent_pid into sway/tree/root.c .
* Disarm key repeat on reloadLibravatar Brian Ashworth2019-01-14
| | | | | | When resetting the keyboard during reload, disarm the key repeat on all keyboards since the bindings (and possibly keyboard) will be freed before the key repeat can go off.
* binding: match single-key bindings if no multi-key binding matchedLibravatar Franklin "Snaipe" Mathieu2018-10-29
| | | | | | | This makes bindings more snappy when the user is typing faster than his keycaps are releasing. Signed-off-by: Franklin "Snaipe" Mathieu <me@snai.pe>
* Bindings use advised keyboard repeat parametersLibravatar frsfnrrg2018-07-29
| | | | | | | | | Now 'repeat_delay' and 'repeat_rate' control the initial delay and rate (per second) of repeated binding invocations. If the repeat delay is zero, binding repetition is disabled. When the repeat rate is zero, the binding is repeated exactly once, assuming no other key events intervene.
* Implement key repeat for pressed key bindingsLibravatar frsfnrrg2018-07-29
| | | | | | | | Each sway_keyboard is provided with a wayland timer event source. When a valid keypress binding has been found, a callback to handle_keyboard_repeat is set. Any key event will either clear the callback or (if the new key event is a valid keypress binding) delay the callback again.
* Fix keyboard shortcut handling inconsistenciesLibravatar frsfnrrg2018-06-12
| | | | | | | | | | | | | | | | | | * Ensure that modifier keys are identified even when the next key does not produce a keysym. This requires that modifier change tracking be done for each sway_shortcut_state. * Permit regular and --release shortcuts on the same key combination. Distinct bindings are identified for press and release cases; note that the release binding needs to be identified for both key press and key release events. * Maintain ascending sort order for the shortcut state list, and keep track of the number of pressed key ids, for simpler (and hence faster) searching of the list of key bindings. * Move binding duplicate detection into get_active_binding to avoid duplicating error messages.
* Comment to explain sway_shortcut_state listsLibravatar frsfnrrg2018-06-01
|
* Rewrite shortcut handling code to avoid hardcoded valuesLibravatar frsfnrrg2018-06-01
| | | | | | | | | The same shortcut algorithm is now used for keycodes, raw keysyms, and translated keysyms. Pressed keysyms are now stored in association with the keycodes that generated them. Modifier keycodes (and associated keysyms) are identified retroactively by the subsequent change to the modifier flags.
* binding releaseLibravatar Tony Crisci2018-01-04
|
* keyboard translate keysymsLibravatar Tony Crisci2017-12-27
|
* fix keyboard hotpluggingLibravatar Tony Crisci2017-12-16
|
* fix header includesLibravatar Tony Crisci2017-12-16
|
* basic configurationLibravatar Tony Crisci2017-12-14
|
* sway input deviceLibravatar Tony Crisci2017-12-12
|
* keyboard removeLibravatar Tony Crisci2017-12-10
|
* basic keyboardLibravatar Tony Crisci2017-12-10