fusuma-plugin-keypress 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: dd49bdce1d44e7fcfed983d3888625bc80e1b383c6d11eac2b7d834913150bd7
4
- data.tar.gz: 7caeb1d2569e2f9e6dbf65b45a67abdb656387b415bfe7ada2c0195f24a11223
3
+ metadata.gz: 3c159e5a01134fb5136fe514f39d82106857b9bd255d3c0c833a21b5a18d2ce2
4
+ data.tar.gz: 89a1e09e00df48e6ebc17ba7a83398465c34b2fbbb33be9c61644b1d9a7c7ba7
5
5
  SHA512:
6
- metadata.gz: a17e0f4a0bc4fdb520ec775ca9d8cc9ce776b3fb2f54e4c56eaa99effafd1164c8986e6f9f03974262660a5639bc7fc573beb0de74bd78cdba07772a1c2c7882
7
- data.tar.gz: 9285228a3a85fd6c4bfd5b9f9b732b537d14ab4f89a15d65cb03ae64672fc61da21b6720807e2072b2378f0e811f7e34b8cf68fb9bc54a48db9d422e60b43202
6
+ metadata.gz: 21a74a0014e61ad41306e23e87e3d13037ddadb50d6cdb027906497f50f7e9f96a2660f310285a26ee1adf2beead0b60d9013c9b9caf578afec267ff76be91e5
7
+ data.tar.gz: 938540d15a236ef1cc6452a466dfa2e7fac6a131112e4afb33e00f0e7c7b78b1a93e98103c316f605519bd5b33d8d8cc5fd975de72c77c832849eddee59ce607
data/README.md CHANGED
@@ -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.5.1" # https://packages.ubuntu.com/search?keywords=ruby&searchon=names&exact=1&suite=all&section=main
25
- # support bionic (18.04LTS) 2.5.1
26
- spec.add_dependency "fusuma", ">= 2.0"
24
+ spec.required_ruby_version = ">= 2.7"
25
+ # https://packages.ubuntu.com/search?keywords=ruby&searchon=names&exact=1&suite=all&section=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: true),
74
- Config::Index::Key.new(codes.join("+"), skippable: true)
73
+ Config::Index::Key.new("keypress", skippable: false),
74
+ Config::Index::Key.new(codes.join("+"), skippable: false)
75
75
  ]
76
76
  )
77
77
  end
@@ -0,0 +1,7 @@
1
+ plugin:
2
+ inputs:
3
+ libinput_command_input:
4
+ show-keycodes: true
5
+ filters:
6
+ keypress_filter:
7
+ keep_device_names:
@@ -3,7 +3,7 @@
3
3
  module Fusuma
4
4
  module Plugin
5
5
  module Keypress
6
- VERSION = "0.8.0"
6
+ VERSION = "0.9.0"
7
7
  end
8
8
  end
9
9
  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_([A-Z]+).*(pressed|released)/
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,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fusuma-plugin-keypress
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.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-08-19 00:00:00.000000000 Z
11
+ date: 2023-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fusuma
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '2.0'
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: '2.0'
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.5.1
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.3.26
67
+ rubygems_version: 3.4.10
67
68
  signing_key:
68
69
  specification_version: 4
69
70
  summary: Keypress plugin for Fusuma