swayfx/include/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
..
desktop Rebase the cursor after applying transactions 2018-10-25 23:37:40 +10:00
input Change mouse buttons to x11 map and libevdev names 2018-12-25 13:27:08 +01:00
tree Fix segfault when destroying unmapped child view 2018-11-28 14:08:20 +01:00
commands.h Implement bar gaps 2018-11-28 11:24:14 -05:00
config.h Rework default output configs 2018-12-13 18:37:25 +01:00
criteria.h Use #if instead of #ifdef 2018-11-18 00:33:06 +01:00
debug.h Turn funcs() into funcs(void) 2018-09-30 14:09:05 +03:00
decoration.h Handle views created after decoration mode is sent for xdg-shell 2018-08-06 15:20:30 +01:00
desktop.h Store geometry in the view and handle any floating view resizing 2018-08-18 15:10:06 +10:00
ipc-json.h Turn funcs() into funcs(void) 2018-09-30 14:09:05 +03:00
ipc-server.h swaybar: show hidden bar on key event 2018-10-14 13:33:12 +01:00
layers.h Update for swaywm/wlroots#1243 2018-09-14 19:21:44 +02:00
output.h Combine output_by_name and output_by_identifier 2018-12-20 19:55:29 +01:00
security.h Move get_feature_policy to sway/security.c 2017-04-16 17:09:53 +03:00
server.h Use #if instead of #ifdef 2018-11-18 00:33:06 +01:00
swaynag.h Remove swaynag_clone and use memcpy 2018-08-03 10:40:09 -04:00
xdg_decoration.h Improve CSD logic 2018-09-27 22:51:37 +10:00
xwayland.h Parse missing i3 window types 2018-10-21 15:59:04 +02:00