swayfx/sway/commands
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
..
bar list.c: rename free_flat_list to list_free_items_and_destroy 2018-12-09 01:15:38 +00:00
input Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
output Combine output_by_name and output_by_identifier 2018-12-20 19:55:29 +01:00
seat Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
assign.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
bar.c Implement bar gaps 2018-11-28 11:24:14 -05:00
bind.c Change mouse buttons to x11 map and libevdev names 2018-12-25 13:27:08 +01:00
border.c Move view {x,y,width,height} into container struct 2018-11-17 21:29:42 +10:00
client.c Move view marks properties to container struct 2018-11-01 18:09:51 +10:00
create_output.c Use #if instead of #ifdef for WLR_HAS_* 2018-11-12 22:23:06 +01:00
default_border.c Allow setting border widths for normal borders using default_border. 2018-05-10 23:35:37 -07:00
default_floating_border.c Implement default_floating_border command and adjust CSD behaviour 2018-07-17 10:14:33 +10:00
default_orientation.c Add default_orientation command 2018-03-30 10:43:55 -04:00
exec.c Update for swaywm/wlroots#1126 2018-07-09 22:54:30 +01:00
exec_always.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
exit.c remove checks for command handlers 2018-02-24 13:22:57 -05:00
floating.c Use parse_boolean where possible. 2018-11-10 12:55:06 +00:00
floating_minmax_size.c Implement floating_minimum_size and floating_maximum_size 2018-07-11 22:16:48 +10:00
floating_modifier.c Implement floating_modifier <mod> [inverse|normal] 2018-07-24 18:41:08 -04:00
focus.c Combine output_by_name and output_by_identifier 2018-12-20 19:55:29 +01:00
focus_follows_mouse.c Add focus_follows_mouse always. (#3081) 2018-11-06 21:58:08 +01:00
focus_on_window_activation.c Implement focus_on_window_activation 2018-09-02 18:20:34 +10:00
focus_wrapping.c Address review comments on parse_boolean 2018-07-23 21:37:53 -04:00
font.c Implement pango support 2018-05-06 08:25:22 +10:00
for_window.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
force_display_urgency_hint.c Fix urgent timer logic and remove unnecessary header includes 2018-07-21 10:28:07 +10:00
force_focus_wrapping.c Switch to using a function to parse booleans 2018-07-23 21:33:17 -04:00
fullscreen.c Fix the error result of the fullscreen command 2018-11-29 17:03:04 +01:00
gaps.c Implement per side and per direction outer gaps 2018-11-07 22:44:11 -05:00
hide_edge_borders.c Handle border options for gaps 2018-10-01 21:19:06 -04:00
include.c Write to swaynag pipe fd directly on config errors 2018-08-03 10:37:35 -04:00
input.c Add scroll factor config option. 2018-11-18 13:49:30 -05:00
kill.c Deny several commands when there's no outputs connected 2018-10-26 00:03:44 +10:00
layout.c Deny several commands when there's no outputs connected 2018-10-26 00:03:44 +10:00
mark.c Move view marks properties to container struct 2018-11-01 18:09:51 +10:00
mode.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
mouse_warping.c Add mouse_warping container 2018-10-10 12:45:21 +02:00
move.c Combine output_by_name and output_by_identifier 2018-12-20 19:55:29 +01:00
no_focus.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
nop.c commands: add nop 2018-08-18 15:50:26 +01:00
opacity.c commands: print correct command on error for exec and opacity 2018-10-23 10:14:50 +01:00
output.c Remove layout.c 2018-08-26 12:05:16 +10:00
popup_during_fullscreen.c Implement popup_during_fullscreen 2018-10-08 22:49:59 +10:00
reload.c list.c: rename free_flat_list to list_free_items_and_destroy 2018-12-09 01:15:38 +00:00
rename.c Return success when renaming a workspace to itself 2018-12-18 14:00:39 +01:00
resize.c resize set: add assertion for an invalid unit 2018-11-25 15:16:45 +03:00
scratchpad.c Deny several commands when there's no outputs connected 2018-10-26 00:03:44 +10:00
seat.c commands: prevent running empty seat command 2018-09-08 19:53:27 +01:00
set.c Replace _XOPEN_SOURCE with _POSIX_C_SOURCE 2018-11-25 17:19:43 +01:00
show_marks.c Move view marks properties to container struct 2018-11-01 18:09:51 +10:00
smart_borders.c Handle border options for gaps 2018-10-01 21:19:06 -04:00
smart_gaps.c Use parse_boolean where possible. 2018-11-10 12:55:06 +00:00
split.c cmd_split: add null checks in do_split 2018-12-17 18:23:32 +01:00
sticky.c Use parse_boolean where possible. 2018-11-10 12:55:06 +00:00
swap.c Use #if instead of #ifdef 2018-11-18 00:33:06 +01:00
swaybg_command.c Allow swaybg to be disabled 2018-10-08 15:08:33 +02:00
swaynag_command.c cmd_swaynag_command: fix typo in variable 2018-10-22 21:19:22 -04:00
tiling_drag.c Introduce tiling_drag directive 2018-09-11 17:17:19 +10:00
title_align.c Implement title alignment 2018-11-25 22:08:58 -05:00
title_format.c Fix crashes when running certain commands on an empty workspace 2018-10-17 19:55:00 +10:00
titlebar_border_thickness.c Adding commands for configuring titlebar borders and padding 2018-11-22 10:30:04 +01:00
titlebar_padding.c Adding commands for configuring titlebar borders and padding 2018-11-22 10:30:04 +01:00
unmark.c Move view marks properties to container struct 2018-11-01 18:09:51 +10:00
urgent.c commands: when setting urgency, check container is not null 2018-10-08 17:48:25 +01:00
workspace.c list.c: rename free_flat_list to list_free_items_and_destroy 2018-12-09 01:15:38 +00:00
workspace_layout.c Implement config parser for workspace_layout 2018-05-28 22:55:06 -04:00
ws_auto_back_and_forth.c cmd_ws_auto_back_and_forth: fix negation 2018-11-11 16:05:13 -05:00