fusuma-plugin-keypress 0.7.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -19
- data/fusuma-plugin-keypress.gemspec +4 -3
- data/lib/fusuma/plugin/detectors/keypress_detector.rb +2 -2
- data/lib/fusuma/plugin/filters/keypress_filter.yml +7 -0
- data/lib/fusuma/plugin/keypress/version.rb +1 -1
- data/lib/fusuma/plugin/parsers/keypress_parser.rb +2 -1
- metadata +9 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c159e5a01134fb5136fe514f39d82106857b9bd255d3c0c833a21b5a18d2ce2
|
4
|
+
data.tar.gz: 89a1e09e00df48e6ebc17ba7a83398465c34b2fbbb33be9c61644b1d9a7c7ba7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21a74a0014e61ad41306e23e87e3d13037ddadb50d6cdb027906497f50f7e9f96a2660f310285a26ee1adf2beead0b60d9013c9b9caf578afec267ff76be91e5
|
7
|
+
data.tar.gz: 938540d15a236ef1cc6452a466dfa2e7fac6a131112e4afb33e00f0e7c7b78b1a93e98103c316f605519bd5b33d8d8cc5fd975de72c77c832849eddee59ce607
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Fusuma::Plugin::Keypress [![Gem Version](https://badge.fury.io/rb/fusuma-plugin-keypress.svg)](https://badge.fury.io/rb/fusuma-plugin-keypress) [![Build Status](https://github.com/iberianpig/fusuma-plugin-keypress/actions/workflows/
|
1
|
+
# Fusuma::Plugin::Keypress [![Gem Version](https://badge.fury.io/rb/fusuma-plugin-keypress.svg)](https://badge.fury.io/rb/fusuma-plugin-keypress) [![Build Status](https://github.com/iberianpig/fusuma-plugin-keypress/actions/workflows/main.yml/badge.svg)](https://github.com/iberianpig/fusuma-plugin-keypress/actions/workflows/main.yml)
|
2
2
|
|
3
3
|
|
4
4
|
Keyboard + Touchpad combination plugin for [Fusuma](https://github.com/iberianpig/fusuma)
|
@@ -6,6 +6,8 @@ Keyboard + Touchpad combination plugin for [Fusuma](https://github.com/iberianpi
|
|
6
6
|
* Customize gestures with modifier keys
|
7
7
|
* Supports multiple modifier key combinations
|
8
8
|
|
9
|
+
NOTE: **Note: This plugin reads key input from keyboard to identify pressed key and assign it to an action.**
|
10
|
+
|
9
11
|
## Installation
|
10
12
|
|
11
13
|
Run the following code in your terminal.
|
@@ -18,19 +20,6 @@ This plugin requires [Fusuma](https://github.com/iberianpig/fusuma#update) versi
|
|
18
20
|
$ sudo gem install fusuma-plugin-keypress
|
19
21
|
```
|
20
22
|
|
21
|
-
### Add show-keycodes option
|
22
|
-
|
23
|
-
Open `~/.config/fusuma/config.yml` and add the following code at the bottom.
|
24
|
-
|
25
|
-
```yaml
|
26
|
-
plugin:
|
27
|
-
inputs:
|
28
|
-
libinput_command_input:
|
29
|
-
show-keycodes: true
|
30
|
-
```
|
31
|
-
|
32
|
-
**NOTE: fusuma can read your keyboard inputs if show-keycodes option is true**
|
33
|
-
|
34
23
|
## Properties
|
35
24
|
|
36
25
|
### Keypress
|
@@ -70,11 +59,6 @@ swipe:
|
|
70
59
|
command: 'xdotool key --clearmodifiers XF86MonBrightnessDown'
|
71
60
|
LEFTMETA+LEFTALT:
|
72
61
|
command: 'xdotool key --clearmodifiers XF86AudioLowerVolume'
|
73
|
-
|
74
|
-
plugin:
|
75
|
-
inputs:
|
76
|
-
libinput_command_input:
|
77
|
-
show-keycodes: true
|
78
62
|
```
|
79
63
|
|
80
64
|
* Swipe up/down with four fingers while keypress LEFTMETA key to change display brightness.
|
@@ -21,9 +21,10 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
22
|
spec.require_paths = ["lib"]
|
23
23
|
|
24
|
-
spec.required_ruby_version = ">= 2.
|
25
|
-
#
|
26
|
-
|
24
|
+
spec.required_ruby_version = ">= 2.7"
|
25
|
+
# https://packages.ubuntu.com/search?keywords=ruby&searchon=names&exact=1&suite=all§ion=main
|
26
|
+
# support focal (20.04LTS) 2.7
|
27
|
+
spec.add_dependency "fusuma", ">= 3.1"
|
27
28
|
spec.metadata = {
|
28
29
|
"rubygems_mfa_required" => "true"
|
29
30
|
}
|
@@ -70,8 +70,8 @@ module Fusuma
|
|
70
70
|
def create_index(codes:)
|
71
71
|
Config::Index.new(
|
72
72
|
[
|
73
|
-
Config::Index::Key.new("keypress", skippable:
|
74
|
-
Config::Index::Key.new(codes.join("+"), skippable:
|
73
|
+
Config::Index::Key.new("keypress", skippable: false),
|
74
|
+
Config::Index::Key.new(codes.join("+"), skippable: false)
|
75
75
|
]
|
76
76
|
)
|
77
77
|
end
|
@@ -19,9 +19,10 @@ module Fusuma
|
|
19
19
|
# event4 KEYBOARD_KEY +7.52s KEY_CAPSLOCK (58) released
|
20
20
|
# event4 KEYBOARD_KEY +8.98s KEY_LEFTCTRL (29) pressed
|
21
21
|
# event4 KEYBOARD_KEY +9.14s KEY_LEFTCTRL (29) released
|
22
|
+
# event4 KEYBOARD_KEY +29.581s KEY_2 (3) released
|
22
23
|
|
23
24
|
case line
|
24
|
-
when /KEYBOARD_KEY.+(\d+\.\d+)s.*KEY_([
|
25
|
+
when /KEYBOARD_KEY.+(\d+\.\d+)s.*KEY_([[:alnum:]_]+)\s.*(pressed|released)/
|
25
26
|
matched = Regexp.last_match
|
26
27
|
# time = matched[1] # 4.81
|
27
28
|
code = matched[2] # LEFTSHIFT
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fusuma-plugin-keypress
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- iberianpig
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fusuma
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.1'
|
27
27
|
description: fusuma-plugin-keypress is Fusuma plugin for keypress combination.
|
28
28
|
email:
|
29
29
|
- yhkyky@gmail.com
|
@@ -40,6 +40,7 @@ files:
|
|
40
40
|
- lib/fusuma/plugin/detectors/keypress_detector.rb
|
41
41
|
- lib/fusuma/plugin/events/records/keypress_record.rb
|
42
42
|
- lib/fusuma/plugin/filters/keypress_filter.rb
|
43
|
+
- lib/fusuma/plugin/filters/keypress_filter.yml
|
43
44
|
- lib/fusuma/plugin/keypress.rb
|
44
45
|
- lib/fusuma/plugin/keypress/version.rb
|
45
46
|
- lib/fusuma/plugin/parsers/keypress_parser.rb
|
@@ -56,14 +57,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
56
57
|
requirements:
|
57
58
|
- - ">="
|
58
59
|
- !ruby/object:Gem::Version
|
59
|
-
version: 2.
|
60
|
+
version: '2.7'
|
60
61
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
61
62
|
requirements:
|
62
63
|
- - ">="
|
63
64
|
- !ruby/object:Gem::Version
|
64
65
|
version: '0'
|
65
66
|
requirements: []
|
66
|
-
rubygems_version: 3.
|
67
|
+
rubygems_version: 3.4.10
|
67
68
|
signing_key:
|
68
69
|
specification_version: 4
|
69
70
|
summary: Keypress plugin for Fusuma
|