sway/sway
Brian Ashworth a223030b70 Change mouse buttons to x11 map and libevdev names
This modifies the way mouse bindings are parsed. Instead of adding to
BTN_LEFT, which results in button numbers that may not be expected,
buttons will be parsed in one of the following ways:

1. `button[1-9]` will now map to their x11 equivalents. This is already
the case for bar bindings. This adds support for binding to axis events,
which was not possible in the previous approach.

2. Anything that starts with `BTN_` will be parsed as an event code name
using `libevdev_event_code_from_name`. This allows for any button to be
mapped to instead of limiting usage to the ones near BTN_LEFT. This also
adds a dependency on libevdev, but since libevdev is already a dependency
of libinput, this should be fine. If needed, this option can have dependency
guards added.

Binding changes:
- button1: BTN_LEFT -> BTN_LEFT
- button2: BTN_RIGHT -> BTN_MIDDLE
- button3: BTN_MIDDLE -> BTN_RIGHT
- button4: BTN_SIDE -> SWAY_SCROLL_UP
- button5: BTN_EXTRA -> SWAY_SCROLL_DOWN
- button6: BTN_FORWARD -> SWAY_SCROLL_LEFT
- button7: BTN_BACK -> SWAY_SCROLL_RIGHT
- button8: BTN_TASK -> BTN_SIDE
- button9: BTN_JOYSTICK -> BTN_EXTRA

Since the axis events need to be mapped to an event code, this uses the
following mappings to avoid any conflicts:
- SWAY_SCROLL_UP: KEY_MAX + 1
- SWAY_SCROLL_DOWN: KEY_MAX + 2
- SWAY_SCROLL_LEFT: KEY_MAX + 3
- SWAY_SCROLL_RIGHT: KEY_MAX + 4
2018-12-25 13:27:08 +01:00
..
commands Change mouse buttons to x11 map and libevdev names 2018-12-25 13:27:08 +01:00
config Terminate swaybg in output_disable 2018-12-19 09:24:15 +01:00
desktop Fix wlr_box_intersection args for wlroots 1441 2018-12-22 18:54:08 +01:00
input Change mouse buttons to x11 map and libevdev names 2018-12-25 13:27:08 +01:00
tree Fix wlr_box_intersection args for wlroots 1441 2018-12-22 18:54:08 +01:00
commands.c Cleanup list code 2018-12-09 01:15:38 +00:00
config.c Rework default output configs 2018-12-13 18:37:25 +01:00
criteria.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
debug-tree.c Minor refactor of input manager 2018-10-20 13:11:43 +10:00
decoration.c Fix double free when unmapping any view 2018-11-15 15:22:09 +10:00
ipc-json.c Update for swaywm/wlroots#1377 2018-12-16 15:04:06 +01:00
ipc-server.c IPC_SUBSCRIBE ensure request object is an array 2018-12-22 14:02:29 +01:00
main.c Cleanup list code 2018-12-09 01:15:38 +00:00
meson.build Change mouse buttons to x11 map and libevdev names 2018-12-25 13:27:08 +01:00
security.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
server.c Update for swaywm/wlroots#1387 2018-11-23 12:07:46 +01:00
sway-bar.5.scd Implement bar gaps 2018-11-28 11:24:14 -05:00
sway-input.5.scd Add scroll factor config option. 2018-11-18 13:49:30 -05:00
sway-output.5.scd fix typo 2018-12-02 20:48:53 +01:00
sway.1.scd Establish sway-output(5) 2018-10-14 10:52:57 -04:00
sway.5.scd Change mouse buttons to x11 map and libevdev names 2018-12-25 13:27:08 +01:00
swaynag.c Allow swaynag to be disabled 2018-10-08 09:59:38 -04:00
xdg_decoration.c Improve CSD logic 2018-09-27 22:51:37 +10:00