README.md in fusuma-plugin-sendkey-0.4.0 vs README.md in fusuma-plugin-sendkey-0.5.0
- old
+ new
@@ -1,20 +1,21 @@
# Fusuma::Plugin::Sendkey [![Gem Version](https://badge.fury.io/rb/fusuma-plugin-sendkey.svg)](https://badge.fury.io/rb/fusuma-plugin-sendkey) [![Build Status](https://travis-ci.com/iberianpig/fusuma-plugin-sendkey.svg?branch=master)](https://travis-ci.com/iberianpig/fusuma-plugin-sendkey)
[Fusuma](https://github.com/iberianpig/fusuma) plugin to send keyboard events
-* Emulate keyboard events with evdev
-* This plugin is wayland compatible and alternative to xdotool
+* Low-latency key event emulation with evdev
+* Alternative to xdotool available for X11 and Wayland
## Installation
Run the following code in your terminal.
### Install dependencies
+**NOTE: If you have installed ruby by apt, you must install ruby-dev.**
```sh
-$ sudo apt-get install libevdev-dev
+$ sudo apt-get install libevdev-dev ruby-dev
```
### Install fusuma-plugin-sendkey
```sh
@@ -25,23 +26,33 @@
## List available keys
```sh
$ fusuma-sendkey -l
```
+If you want to look up a specific key, like the next song or the previous song, the `grep -i` refinement search is useful.
+```sh
+$ fusuma-sendkey -l | grep -i song
+NEXTSONG
+PREVIOUSSONG
+```
+
## Run fusuma-sendkey on Terminal
* `fusuma-sendkey` command is available on your terminal
-* `fusuma-sendkey` can send multiple key events
-* Combine keys for pressing the same time with `+`
+* `fusuma-sendkey` supports modifier keys and multiple key presses.
+Combine keys for pressing the same time with `+`
```sh
$ fusuma-sendkey LEFTCTRL+T # press ctrl key + t key
```
+Some of the keys found with `fusuma-sendkey -l` may actually be invalid keys.
+So test it once with `fusuma-sendkey <KEYCODE>` and then add it to config.yml.
+
## Add sendkey properties to config.yml
Add `sendkey:` property in `~/.config/fusuma/config.yml`.
lines beginning from `#` are comments
@@ -55,9 +66,29 @@
sendkey: "LEFTALT+LEFT" # history forward
up:
sendkey: "LEFTCTRL+T" # open new tab
down:
sendkey: "LEFTCTRL+W" # close tab
+```
+
+
+### Specify keyboard by device name
+
+If you got following error message, try to set your keyboard name to `plugin.executors.sendkey_executor.device_name` on config.yml
+
+```shell
+$ fusuma-sendkey -l
+sendkey: Keyboard: /keyboard|Keyboard|KEYBOARD/ is not found
+```
+
+Set the following options to recognize keyboard only for the specified keyboard device.
+Open `~/.config/fusuma/config.yml` and add the following code at the bottom.
+
+```yaml
+plugin:
+ executors:
+ sendkey_executor:
+ device_name: 'YOUR KEYBOARD NAME'
```
## Contributing
Bug reports and pull requests are welcome on GitHub at https://github.com/iberianpig/fusuma-plugin-sendkey. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.