* Add TOML support to load_configs()
* Add TOML tests to config/tests.rs
* Add TOML to Cargo.toml
* Move toml tests in src/config/tests.rs to below yaml tests
* Add filename extension checker to config parser
---------
Co-authored-by: Matt Amend <matt.a.amend@gmail.com>
* begin threading InputDevice down to `find_modmap`/`find_keymap`
why did i comment this out?
* add to config
* new approach for event/device (wip)
* try passing input_device as its own thing -- same problem
* aha! this works!
* this works too!
* start wiring it together
* that might do it?
* fallback to false, like for application
* fix device.not
* tests (wip)
* tests (wip) | well it compiles
* tests (wip) | just placeholder for now
* move device out of event
* Revert "move device out of event"
This reverts commit c9486ed2adee5f001ebf96d630621fabcb2127a5.
* device desc struct (k0kubun's suggestion)
* get tests passing
* s/InputDeviceDescriptor/InputDeviceInfo/
* add a test
* misc cleanup
* use &str and &Path instead of String and PathBuf
* cargo fmt
* move InputDeviceInfo in device.rs
* more misc cleanup
* documentation
* get rid of extraneous `matches` function
* readme tweak
This reverts commit c72d9b67f0.
Revert "Use xremap as the device name by default (#348)"
This reverts commit 26c90bb2b5.
Revert "Version 0.8.10"
This reverts commit d5ccb8c917.
* First implementation of kde client
* load kwin-script via dbus interface on startup, if not already present
* remove temp file after use
* fix wrong object path
* fix wrong load_script return type
* log important information
* try to unload plugin if loading fails.
* change info to println, since it should always be printed
* remove unnecessary mut
* extend README.md
* extend build.yml to build, test, and publish the kde version
* improve README.md
* fix: application None check when failed get the application name
* Update src/client/hypr_client.rs
Co-authored-by: Takashi Kokubun <takashikkbn@gmail.com>
* Ensure the launched commands are not terminated by the stop of xremap.
Fix#213.
Signed-off-by: Kai Xia <kaix+github@fastmail.com>
* also stop child processes on unhappy path.
Signed-off-by: Kai Xia <kaix+github@fastmail.com>
* fix fmt
Signed-off-by: Kai Xia <kaix+github@fastmail.com>
Signed-off-by: Kai Xia <kaix+github@fastmail.com>
* Introduce keymap level `exact_match` option.
Example:
keymap:
- exact_match: true
remap:
M-f: C-right
Given the above, and M-Shift-f is pressed:
- If `exact_match` is false or unset, the existing behaviour will be used,
which will translate M-Shift-f to C-Shift-right.
- If `exact_match` is true, M-Shift-f will be sent as is, i.e. not matched.
* Perform exact match first.
* Interleave pressing/releasing of modifier keys.
Pressing new modifier keys before releasing the old ones to avoid
triggering actions in applications that recognize the old keys.
For example, if we bind alt+f to ctrl+right, before this change, the
following key sequence is generated with alt+f:
(user) send Alt_L PRESS
(xremap) send Alt_L RELEASE
(xremap) send Control_L PRESS
(xremap) send Right PRESS
(xremap) send Right RELEASE
(xremap) send Control_L RELEASE
(xremap) send Alt_L PRESS
(user) send Alt_L RELEASE
The press + release of the alt key (both at the start and end of the
sequence) is causing apps like Firefox to show/focus the menu bar.
After this change, the following key sequence is generated with alt+f:
(user) send Alt_L PRESS
(xremap) send Control_L PRESS
(xremap) send Alt_L RELEASE
(xremap) send Right PRESS
(xremap) send Right RELEASE
(xremap) send Alt_L PRESS
(xremap) send Control_L RELEASE
(user) send Alt_L RELEASE
So the difference here is that we press the ctrl key before releasing
alt, so will not trigger apps like Firefox to show hide the menu when
alt+f is used, and a single press and release of the alt key will
still show the menu as their normal behavior.
As far as I can observe, this is also the behavior of AutoHotKey on Windows.
* Add test.
* Introduce Event enum
* Rename KeyAction/Action to ModmapAction/KeymapAction
* Introduce Action enum and ActionDispatcher
* Convert OverrideTimeout to an event
* thread::sleep should also be an Action
* Command should also be an Action
* Make InputEvent an Action
* Start writing tests for EventHandler
* cargo fmt
```
keymap:
- remap:
RO: Shift-RO
```
When you press Shift-RO, Shift is considered extra_modifiers (against
source KeyPress) and it was released after Shift-RO. This patch fixes
that case.