mirror of
https://github.com/swaywm/sway.git
synced 2025-11-14 06:59:47 -05:00
ipc: add an input event
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
This commit is contained in:
parent
36aa67e549
commit
6effca7b61
7 changed files with 107 additions and 0 deletions
|
|
@ -1371,6 +1371,9 @@ available:
|
|||
|- 0x80000014
|
||||
: bar_status_update
|
||||
: Send when the visibility of a bar should change due to a modifier
|
||||
|- 0x80000015
|
||||
: input
|
||||
: Sent when something related to input devices changes
|
||||
|
||||
|
||||
## 0x80000000. WORKSPACE
|
||||
|
|
@ -1702,6 +1705,56 @@ event is a single object with the following properties:
|
|||
}
|
||||
```
|
||||
|
||||
## 0x80000015. INPUT
|
||||
|
||||
Sent when something related to the input devices changes. The event is a single
|
||||
object with the following properties:
|
||||
|
||||
[- *PROPERTY*
|
||||
:- *DATA TYPE*
|
||||
:- *DESCRIPTION*
|
||||
|- change
|
||||
: string
|
||||
:[ What has changed
|
||||
|- input
|
||||
: object
|
||||
: An object representing the input that is identical the ones GET_INPUTS gives
|
||||
|
||||
The following change types are currently available:
|
||||
[- *TYPE*
|
||||
:- *DESCRIPTION*
|
||||
|- added
|
||||
:[ The input device became available
|
||||
|- removed
|
||||
: The input device is no longer available
|
||||
|- xkb_keymap
|
||||
: (Keyboards only) The keymap for the keyboard has changed
|
||||
|- xkb_layout
|
||||
: (Keyboards only) The effective layout in the keymap has changed
|
||||
|
||||
*Example Event:*
|
||||
```
|
||||
{
|
||||
"change": "xkb_layout",
|
||||
"input": {
|
||||
"identifier": "1:1:AT_Translated_Set_2_keyboard",
|
||||
"name": "AT Translated Set 2 keyboard",
|
||||
"vendor": 1,
|
||||
"product": 1,
|
||||
"type": "keyboard",
|
||||
"xkb_layout_names": [
|
||||
"English (US)",
|
||||
"English (Dvorak)"
|
||||
],
|
||||
"xkb_active_layout_index": 1,
|
||||
"xkb_active_layout_name": "English (Dvorak)",
|
||||
"libinput": {
|
||||
"send_events": "enabled"
|
||||
}
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
# SEE ALSO
|
||||
|
||||
*sway*(1) *sway*(5) *sway-bar*(5) *swaymsg*(1) *sway-input*(5) *sway-output*(5)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue