swayfx/include
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
..
sway Change mouse buttons to x11 map and libevdev names 2018-12-25 13:27:08 +01:00
swaybar swaybar: fix cursor scale 2018-12-15 09:26:50 +01:00
swaylock Add multiseat support to swaylock 2018-10-24 22:04:16 +10:00
swaynag Implement swaynag -B/--button-no-terminal 2018-11-27 23:34:51 -05:00
background-image.h Initial swaylock port 2018-04-04 18:47:48 -04:00
cairo.h Use #if instead of #ifdef 2018-11-18 00:33:06 +01:00
ipc-client.h swaybar: move core functionality to state.c 2016-01-24 14:22:19 +01:00
ipc.h swaybar: show hidden bar on key event 2018-10-14 13:33:12 +01:00
list.h list.c: rename free_flat_list to list_free_items_and_destroy 2018-12-09 01:15:38 +00:00
log.h Remove __PRETTY_FUNCTION__ 2018-09-06 13:31:57 +12:00
loop.h Remove timerfd from loop implementation 2018-10-15 00:26:27 +10:00
meson.build Address review comments 2018-03-28 14:43:23 -04:00
pango.h Fix pango escaping and refactor escape_markup_text 2018-09-22 18:33:28 +10:00
pool-buffer.h client/pool-buffer: munmap in destroy_buffer 2018-05-27 14:09:48 +01:00
readline.h Address emersion's feedback on peek_line 2018-06-02 08:07:44 -04:00
stringop.h list.c: rename free_flat_list to list_free_items_and_destroy 2018-12-09 01:15:38 +00:00
unicode.h Add password buffer, refactor rendering/surfaces 2018-04-04 18:47:48 -04:00
util.h Add scroll factor config option. 2018-11-18 13:49:30 -05:00