Commit Graph

56 Commits

Author SHA1 Message Date
Tarcísio Eduardo Moreira Crocomo 5d1a3c98b4 Implement clickfinger_button_map support. 2024-04-10 18:01:50 -03:00
iff 8a8fb76ec1 Update sway-input.5.scd 2023-10-05 10:04:32 +02:00
Simon Ser ee4637b086 Deprecate seat idle_wake
Sway has two knobs to control idling:

- seat idle_inhibit: when the seat is active (ie. not idle), this
  extends the active state. When the seat is idle, this is
  ignored.
- seat idle_wake: when the seat is idle, this wakes up the seat.
  When the seat is active, this is ignored.

The motivation for the deprecation is two-fold:

- The concept of "seat idle state" is ill-defined. Each idle-notify-v1
  client will pass a different idle timeout. With the old logic, a
  seat was declared idle if and only if all idle-notify-v1 timeouts have
  expired. However, if only a portion of the timeouts have expired,
  then some clients would wake up, and the rest would stay active.
  This is inconsistent with the definition of idle_inhibit/idle_wake:
  idle_inhibit was used for clients which are waking up.
- It never worked properly with the new idle-notify-v1 protocol
  and no-one noticed. Only the legacy KDE idle protocol is taken
  into account, but that protocol is not used anymore.
2023-07-19 09:28:33 +02:00
Cezary Drożak c08762901e input/libinput: add scroll_button_lock method
Closes https://github.com/swaywm/sway/issues/6987

Co-authored-by: JJGadgets <git@jjgadgets.tech>
Co-authored-by: DeltaWhy <mike5713@gmail.com>
2023-06-16 15:30:04 +02:00
Simon Ser 4f6e559dec man: deprecate seat cursor move/set/press/release
The Wayland protocol better serves this purpose, and is supported
by more compositors.
2023-03-26 23:22:04 +02:00
Stanislav Ochotnický ebeed7e303 man: add warning for hide_cursor configuration
See https://github.com/swaywm/sway/issues/6297
2023-03-11 11:58:05 -05:00
Lucas Zampieri efd83cb8b9 Add libinput RotationAngle
This patch adds the libinput option RotationAngle to sway.

Signoff-by: Lucas Zampieri <lzampier@redhat.com>
2022-12-09 11:28:53 +01:00
pudiva chip líquida 7cc8ab6d6c Support libinput's 1.21 new dwtp option
Support the new dwtp (disable while trackpointing) option introduced in
libinput 1.21, allowing users to control whether the trackpoint (like
those in Thinkpads, but not only) should be disabled while using the
keyboard/touchpad.

See: https://gitlab.freedesktop.org/libinput/libinput/-/issues/731
2022-10-30 10:56:34 +01:00
Elyes HAOUAS 8aae6a8eab sway-input.5.scd: Fix spelling errors
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
2021-10-02 10:21:28 +02:00
Simon Ser 641b8719ad man: document `input XXX map_to_output *`
This is useful to reset the output mapping.
2021-02-25 09:38:00 -05:00
Tamir Zahavi-Brunner 96578aa91e hide_cursor: Add an option to hide when typing
Add an option for the `hide_cursor` command to hide the cursor when
typing, i.e. whenever a key is pressed.
2020-10-30 09:59:54 +01:00
Tudor Brindus ed247c031c input/tablet: add tool_mode option to set tablet tools as relative input
Closes #4139.
2020-10-12 15:01:37 +02:00
jhalmen 99897a6ca0 fix typos in sway-input.5.scd 2020-04-29 12:43:34 +02:00
Dennis Schridde 6498542b24 Document input selector precedence
Signed-off-by: Dennis Schridde <devurandom@gmx.net>
2020-03-15 18:05:14 -04:00
Michael Weiser 3ee5aace33 commands: Add shortcuts_inhibitor command
Add a command to influence keyboard shortcuts inhibitors. In its current
form it can be used to activate, deactivate or toggle an existing
inhibitor on the surface currently receiving input. This can be used to
define an escape shortcut such as:

bindsym --inhibited $mod+Escape seat - shortcuts_inhibitor deactivate

It also allows the user to configure a per-seat default of whether
keyboard inhibitors are honoured by default (the default) or not. Using
the activate/toggle command they can then enable the lingering inhibitor
at a later time of their choosing.

As a side effect this allows to specifically address a named seat for
actions as well, whatever use-case that might serve.

Signed-off-by: Michael Weiser <michael.weiser@gmx.de>
2020-03-11 23:51:37 -04:00
Bor Grošelj Simić 27d5cf1316 input: implement cycling through keyboard layout list 2020-03-11 12:12:23 +01:00
Ronan Pigott 5215cdfa92 sway-input.5: Document repeat_delay and repeat_rate only once 2020-01-16 16:15:50 +01:00
Ross Schulman b758b43085 Fix small typo in sway-input(5) 2020-01-05 11:16:15 -05:00
Brian Ashworth 452a615bb8 seat_cmd_keyboard_grouping: change keymap to smart
This removes `seat <seat> keyboard_grouping keymap` and replaces it with
`seat <seat> keyboard_grouping smart`. The smart keyboard grouping will
group based on both the keymap and repeat info. The reasoning for this
is that deciding what the repeat info should be for a group is either
arbitrary or non-deterministic when multiple keyboards in the group have
repeat info configured (unless somehow exposed to the user in a
reproducible uniquely identifiable fashion).
2019-12-16 12:03:11 -05:00
Drew DeVault 2f3c6cccf5 Add seat <seat> idle_{inhibit,wake} <sources...>
This adds seat configuration options which can be used to configure what
events affect the idle behavior of sway.

An example use-case is mobile devices: you would remove touch from the
list of idle_wake events. This allows the phone to stay on while you're
actively using it, but doesn't wake from idle on touch events while it's
sleeping in your pocket.
2019-12-12 10:37:30 -05:00
Brian Ashworth 5d882cb5fc Add support for wlr_keyboard_group
A wlr_keyboard_group allows for multiple keyboard devices to be
combined into one logical keyboard. This is useful for keyboards that
are split into multiple input devices despite appearing as one physical
keyboard in the user's mind.

This adds support for wlr_keyboard_groups to sway. There are two
keyboard groupings currently supported, which can be set on a per-seat
basis. The first keyboard grouping is none, which disables all grouping
and provides no functional change. The second is keymap, which groups
the keyboard devices in the seat by their keymap. With this grouping,
the effective layout and repeat info is also synced across keyboard
devices in the seat. Device specific bindings will still be executed as
normal, but everything else related to key and modifier events will be
handled by the keyboard group's keyboard.
2019-11-21 10:42:10 -05:00
Tadeo Kondrak 4829f1c26a Implement input map_to_region command 2019-11-17 13:34:24 +01:00
Nils ANDRÉ-CHANG 21717d2ed2 Fix type (an -> and) 2019-09-05 22:02:33 +03:00
Simon Ser 1b396273bb man: document how to specify multiple xkb layouts and options
This isn't described in xkeyboard-config(7).
2019-09-02 08:39:25 +09:00
Martin Michlmayr 3dcfa2ee90 Fix markup syntax in man pages 2019-08-31 22:50:39 +09:00
Ed Younis eb770e88b7 Implement input_cmd_xkb_file (#3999)
Adds a new commend "xkb_file", which constructs the internal
xkb_keymap from a xkb file rather than an RMLVO configuration.
This allows greater flexibility when specifying xkb configurations.
An xkb file can be dumped with the xkbcomp program.
2019-07-17 19:26:58 -04:00
Sergei Dolgov 01ec18e802 Add calibration_matrix config option
Can be used to change the orientation of a touchscreen.

Example usage with swaymsg:

    # identity
    swaymsg input type:touch calibration_matrix '"1 0 0 0 1 0"'

    # 90 degree clockwise
    swaymsg input type:touch calibration_matrix '"0 -1 1 1 0 0"'

    # 180 degree clockwise
    swaymsg input type:touch calibration_matrix '"-1 0 1 0 -1 1"'

    # 270 degree clockwise
    swaymsg input type:touch calibration_matrix '"0 1 0 -1 0 1"'

Documentation:

    https://wayland.freedesktop.org/libinput/doc/latest/absolute-axes.html#calibration-of-absolute-devices
2019-07-05 18:41:56 +03:00
Simon Ser 3f2518edc1 Add missing docs for xkb_switch_layout 2019-06-10 01:41:44 -04:00
Daniel Eklöf 190546fd31 add seat sub command 'xcursor_theme'
New 'seat <name> xcursor_theme <theme> [<size>]' command that
configures the default xcursor theme.

The default seat's xcursor theme is also propagated to XWayland, and
exported through the XCURSOR_THEME and XCURSOR_SIZE environment
variables. This is done every time the default seat's configuration is
changed.
2019-06-05 11:00:10 -04:00
Benjamin Cheng bd3720585e Implement input type configs (#3784)
Add support for configurations that apply to a type of inputs
(i.e. natural scrolling on all touchpads). A type config is
differentiated by a `type:` prefix followed by the type it
corresponds to.

When new devices appear, the device config is merged on top of its
type config (if it exists). New type configs are applied on top of
existing configs.
2019-04-14 19:31:36 -04:00
Martin Michlmayr 090e101581 sway-input.5: add xkeyboard-config(7) to "see also"
Since xkeyboard-config(7) is mentioned in the man page, add a reference
to the "see also" section.
2019-04-12 21:45:13 +03:00
Brian Ashworth f7f5b172a0 sway-input.5: document wildcard and identifier troubleshooting
This documents the wildcard character for both inputs and seats. There
is also a tip added on trying the wildcard to verify a setting if the
identifier does not appear to be working.
2019-02-16 23:50:37 +01:00
Brian Ashworth f425e81fbe cmd_seat: allow - to be used as alias for current
This allows for `-` (hyphen) to be used as an alias for the current seat
while sway is running. This alias was chosen since it is unlikely to
interfere with any desirable seat identifier
2019-02-02 22:02:28 -05:00
Brian Ashworth ebe5399ed6 pointer_constraint: change to a seat subcommand
This changes the `pointer_constraint` command to be a subcommand of seat
to allow for per-seat settings. The current implementation that is not a
seat subcommand will only operate on the current seat and will segfault
in the config due to `config->handler_context.seat` only being set at
runtime.

This also allows for the wildcard identifier to be used to alter the
pointer constraint settings on all seats and allows for the setting to
be merged with the rest of the seat config.
2019-01-31 22:58:52 -05:00
Drew DeVault cd22d555e8 Remove unnecessary underscores in man pages 2019-01-27 11:27:48 -05:00
Brian Ashworth 91c1f44956 input_cmd_events: allow toggle modes to be listed
This extends `input <identifier> events toggle` to allow for an optional
list of modes to toggle through. If no event modes are listed, all
supported modes are cycled through (current behavior). If event modes
are listed, they will be cycled through, defaulting to the first mode
listed when the current mode is not in the list. This modes listed will
also not be checked to see if the device supports them and may fail.
2019-01-21 02:13:01 -05:00
Drew DeVault 9f9ef76175
Merge pull request #3343 from RedSoxFan/seat-cursor-buttons-improved
Improve mouse button parsing: seat cursor buttons
2019-01-13 20:40:42 -05:00
Drew DeVault db1631b67d
Merge pull request #3342 from RedSoxFan/scroll-buttons-improved
Improve mouse button parsing: input scroll_button
2019-01-13 20:40:00 -05:00
Brian Ashworth 4e6bd53abf input_cmd_scroll_button: utilize mouse btn helpers
This modifies `input_cmd_scroll_button` to utilize the mouse button
helper `get_mouse_button` when parsing the button. x11 axis buttons are
not supported with this command and `CMD_INVALID` will be returned, but
all other x11 buttons, button event names, and button event codes should
be working
2019-01-10 12:45:52 -05:00
Brian Ashworth aa1c838f97 seat_cmd_cursor: utilize mouse button helpers
This modifies `seat_cmd_cursor` to utilize `get_mouse_button` when
parsing mouse buttons for the `press` and `release` operations. All x11
buttons, button event names, and button event codes are supported.
For x11 axis buttons, `dispatch_cursor_axis` is used instead of
`dispatch_cursor_button`. However the `press`/`release` state is ignored
and the either axis event is processed. This also removes support for
`left` and `right` in favor of `BTN_LEFT` and `BTN_RIGHT`.
2019-01-10 11:47:34 -05:00
Brian Ashworth 55e1d599a2 input_cmd_events: implement toggle
Implements toggling input events during runtime. This will not attempt
to toggle to a mode that is not supported by the device.

When toggling the wildcard input, the device specific input configs are
altered. Each device will cycle one supported mode.
2019-01-09 23:17:27 -05:00
Brian Ashworth 4d88c95790 hide_cursor: change to a seat subcommand
This makes hide_cursor a seat subcommand, which allows for seat specific
timeouts.
2018-12-30 14:17:24 +01:00
Spencer Michaels 70bc4c3ab6 Add scroll factor config option. 2018-11-18 13:49:30 -05:00
Drew DeVault b69060fc58 Establish sway-output(5) 2018-10-14 10:52:57 -04:00
Drew DeVault e60ad3f677 Fix some missing commands in sway-input(5) 2018-10-03 07:50:37 -04:00
Drew DeVault 8f6aca2166
Merge pull request #2725 from PumbaPe/add-tap-and-drag
Add tap and drag to sway-input
2018-09-30 13:44:11 +02:00
PP ae2b70f59e add tap-and-drag setting to sway-input 2018-09-29 11:49:41 +02:00
Brian Ashworth a9d9944e76 sway{,bar,input}.5: changes for generic blocks 2018-09-28 13:30:54 -04:00
Marius Orcsik 7b9aee5451
Escaping underscores in tap_button_map 2018-07-29 14:47:53 +02:00
Geoff Greer 30fee94354 Don't enable numlock by default. This fixes an annoying issue where laptop keyboards would have 'numlock mode' enabled, remapping parts of the alphabet to numbers. 2018-07-28 16:22:20 -07:00