iberianpig / fusuma-plugin-sendkey

Fusuma plugin that sending virtual keyboard events
MIT License
70 stars 1 forks source link

fusuma-plugin-sendkey causes error #18

Closed HritwikSinghal closed 3 years ago

HritwikSinghal commented 3 years ago

here is my error when running fusuma. I followed all steps in the readme only. This is on manjaro 21.0 (see last output)

    ~  fusuma                                                                                                                                         ✔  3s  
I, [2021-03-21T04:23:54.665735 #11757]  INFO -- : reload config: /home/hritwik/.config/fusuma/config.yml
Traceback (most recent call last):
    33: from /usr/bin/fusuma:23:in `<main>'
    32: from /usr/bin/fusuma:23:in `load'
    31: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/exe/fusuma:41:in `<top (required)>'
    30: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma.rb:17:in `run'
    29: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma.rb:34:in `read_options'
    28: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:68:in `require_base_plugins'
    27: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:68:in `require_relative'
    26: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/executor.rb:5:in `<top (required)>'
    25: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/executor.rb:6:in `<module:Fusuma>'
    24: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/executor.rb:8:in `<module:Plugin>'
    23: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/executor.rb:13:in `<module:Executors>'
    22: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/base.rb:13:in `inherited'
    21: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:56:in `add'
    20: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:16:in `require_siblings_from_plugin_dir'
    19: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:16:in `each'
    18: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:17:in `block in require_siblings_from_plugin_dir'
    17: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    16: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    15: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/command_executor.rb:5:in `<top (required)>'
    14: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/command_executor.rb:6:in `<module:Fusuma>'
    13: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/command_executor.rb:7:in `<module:Plugin>'
    12: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/command_executor.rb:9:in `<module:Executors>'
    11: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/base.rb:13:in `inherited'
    10: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:57:in `add'
     9: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:23:in `require_siblings_from_gems'
     8: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:23:in `each'
     7: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:25:in `block in require_siblings_from_gems'
     6: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
     5: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
     4: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-plugin-sendkey-0.5.1/lib/fusuma/plugin/executors/sendkey_executor.rb:3:in `<top (required)>'
     3: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-plugin-sendkey-0.5.1/lib/fusuma/plugin/executors/sendkey_executor.rb:3:in `require_relative'
     2: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-plugin-sendkey-0.5.1/lib/fusuma/plugin/sendkey/keyboard.rb:3:in `<top (required)>'
     1: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- revdev (LoadError)
    ~  which fusuma                                                                                                                                          ✔ 

/usr/bin/fusuma
    ~  sudo which fusuma                                                                                                                                     ✔ 

/usr/bin/fusuma

    ~  fusuma --version                                                                                                                                      ✔ 
I, [2021-03-21T04:37:05.072509 #25204]  INFO -- : reload config: /home/hritwik/.config/fusuma/config.yml
Traceback (most recent call last):
    33: from /usr/bin/fusuma:23:in `<main>'
    32: from /usr/bin/fusuma:23:in `load'
    31: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/exe/fusuma:41:in `<top (required)>'
    30: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma.rb:17:in `run'
    29: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma.rb:34:in `read_options'
    28: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:68:in `require_base_plugins'
    27: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:68:in `require_relative'
    26: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/executor.rb:5:in `<top (required)>'
    25: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/executor.rb:6:in `<module:Fusuma>'
    24: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/executor.rb:8:in `<module:Plugin>'
    23: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/executor.rb:13:in `<module:Executors>'
    22: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/base.rb:13:in `inherited'
    21: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:56:in `add'
    20: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:16:in `require_siblings_from_plugin_dir'
    19: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:16:in `each'
    18: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:17:in `block in require_siblings_from_plugin_dir'
    17: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    16: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
    15: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/command_executor.rb:5:in `<top (required)>'
    14: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/command_executor.rb:6:in `<module:Fusuma>'
    13: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/command_executor.rb:7:in `<module:Plugin>'
    12: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/executors/command_executor.rb:9:in `<module:Executors>'
    11: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/base.rb:13:in `inherited'
    10: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:57:in `add'
     9: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:23:in `require_siblings_from_gems'
     8: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:23:in `each'
     7: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-1.11.1/lib/fusuma/plugin/manager.rb:25:in `block in require_siblings_from_gems'
     6: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
     5: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
     4: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-plugin-sendkey-0.5.1/lib/fusuma/plugin/executors/sendkey_executor.rb:3:in `<top (required)>'
     3: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-plugin-sendkey-0.5.1/lib/fusuma/plugin/executors/sendkey_executor.rb:3:in `require_relative'
     2: from /usr/lib/ruby/gems/2.7.0/gems/fusuma-plugin-sendkey-0.5.1/lib/fusuma/plugin/sendkey/keyboard.rb:3:in `<top (required)>'
     1: from /usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require'
/usr/lib/ruby/2.7.0/rubygems/core_ext/kernel_require.rb:85:in `require': cannot load such file -- revdev (LoadError)

after removing fusuma-plugin-keypress, it works.

sudo gem uninstall fusuma-plugin-keypress

Now it shows

    ~  fusuma                                                                                                                                                ✔ 
I, [2021-03-21T04:44:45.160428 #30230]  INFO -- : reload config: /home/hritwik/.config/fusuma/config.yml
I, [2021-03-21T04:44:45.199568 #30230]  INFO -- : ---------------------------------------------
I, [2021-03-21T04:44:45.199606 #30230]  INFO -- : Fusuma: 1.11.1
I, [2021-03-21T04:44:45.201205 #30230]  INFO -- : libinput: 1.17.0
I, [2021-03-21T04:44:45.201740 #30230]  INFO -- : OS: Linux 5.11.6-1-MANJARO #1 SMP PREEMPT Thu Mar 11 19:05:51 UTC 2021
I, [2021-03-21T04:44:45.202344 #30230]  INFO -- : Distribution: Manjaro Linux \r  (\n) (\l)
I, [2021-03-21T04:44:45.204922 #30230]  INFO -- : Desktop session: gnome wayland
I, [2021-03-21T04:44:45.204954 #30230]  INFO -- : ---------------------------------------------
I, [2021-03-21T04:44:45.204966 #30230]  INFO -- : Enabled Plugins: 
I, [2021-03-21T04:44:45.205034 #30230]  INFO -- :   Fusuma::Plugin::Buffers::GestureBuffer
I, [2021-03-21T04:44:45.205052 #30230]  INFO -- :   Fusuma::Plugin::Buffers::KeypressBuffer
I, [2021-03-21T04:44:45.205062 #30230]  INFO -- :   Fusuma::Plugin::Buffers::TapBuffer
I, [2021-03-21T04:44:45.205071 #30230]  INFO -- :   Fusuma::Plugin::Detectors::KeypressDetector
I, [2021-03-21T04:44:45.205079 #30230]  INFO -- :   Fusuma::Plugin::Detectors::PinchDetector
I, [2021-03-21T04:44:45.205087 #30230]  INFO -- :   Fusuma::Plugin::Detectors::RotateDetector
I, [2021-03-21T04:44:45.205101 #30230]  INFO -- :   Fusuma::Plugin::Detectors::SwipeDetector
I, [2021-03-21T04:44:45.205116 #30230]  INFO -- :   Fusuma::Plugin::Detectors::TapDetector
I, [2021-03-21T04:44:45.205129 #30230]  INFO -- :   Fusuma::Plugin::Events::Records::GestureRecord
I, [2021-03-21T04:44:45.205141 #30230]  INFO -- :   Fusuma::Plugin::Events::Records::IndexRecord
I, [2021-03-21T04:44:45.205150 #30230]  INFO -- :   Fusuma::Plugin::Events::Records::KeypressRecord
I, [2021-03-21T04:44:45.205165 #30230]  INFO -- :   Fusuma::Plugin::Events::Records::TextRecord
I, [2021-03-21T04:44:45.205181 #30230]  INFO -- :   Fusuma::Plugin::Executors::CommandExecutor
I, [2021-03-21T04:44:45.205193 #30230]  INFO -- :   Fusuma::Plugin::Executors::WmctrlExecutor
I, [2021-03-21T04:44:45.205201 #30230]  INFO -- :   Fusuma::Plugin::Filters::KeypressFilter
I, [2021-03-21T04:44:45.205209 #30230]  INFO -- :   Fusuma::Plugin::Filters::LibinputDeviceFilter
I, [2021-03-21T04:44:45.205218 #30230]  INFO -- :   Fusuma::Plugin::Filters::LibinputTimeoutFilter
I, [2021-03-21T04:44:45.205240 #30230]  INFO -- :   Fusuma::Plugin::Inputs::LibinputCommandInput
I, [2021-03-21T04:44:45.205251 #30230]  INFO -- :   Fusuma::Plugin::Parsers::KeypressParser
I, [2021-03-21T04:44:45.205259 #30230]  INFO -- :   Fusuma::Plugin::Parsers::LibinputGestureParser
I, [2021-03-21T04:44:45.205266 #30230]  INFO -- :   Fusuma::Plugin::Parsers::TapParser
I, [2021-03-21T04:44:45.205278 #30230]  INFO -- : ---------------------------------------------
HritwikSinghal commented 3 years ago

Here is my config

swipe:
  3:
    left:
      sendkey: "LEFTALT+RIGHT" # history back
      keypress:
        LEFTCTRL:
          sendkey: "PREVIOUSSONG"
        # LEFTMETA+LEFTALT:
          # sendkey: 'BRIGHTNESSDOWN'

    right:
      sendkey: "LEFTALT+LEFT" # history forward
      keypress:
        LEFTCTRL:
          sendkey: "NEXTSONG"
        # LEFTMETA+LEFTALT:
        #   sendkey: 'xdotool key --clearmodifiers XF86AudioLowerVolume'

    up:
      sendkey: "LEFTMETA" # Overview
      keypress:
        LEFTCTRL:
          sendkey: "LEFTCTRL+K" # open new tab
        LEFTCTRL+LEFTALT:
          sendkey: 'BRIGHTNESSUP'

    down:
      sendkey: "LEFTMETA" # Overview
      keypress:
        LEFTCTRL:
          sendkey: "LEFTCTRL+COMMA" # close tab
        LEFTCTRL+LEFTALT:
          sendkey: 'BRIGHTNESSDOWN'

  4:
    left:
      sendkey: "VOLUMEDOWN"
    right:
      sendkey: "VOLUMEUP"
#     up:
#       sendkey: "xdotool key ctrl+alt+Down" # Switch to next workspace
#     down:
#       sendkey: "xdotool key ctrl+alt+Up" # Switch to previous workspace
pinch:
  in:
    sendkey: "ZOOMOUT" # Zoom in
  out:
    sendkey: "ZOOMIN" # Zoom out

threshold:
  pinch: 0.4
  swipe: 0.2

interval:
  swipe: 0.8
  pinch: 0.5
  tap: 0.2

tap:
  # 1:
  #   sendkey: "echo ----------------tap1----------------------------"
  # 2:
  #   sendkey: "echo ----------------tap2----------------------------"
  # 3:
    # sendkey: "echo ----------------tap3----------------------------"
  # 4:
    # sendkey: "PLAYPAUSE"

hold:
#   1:
#     command: "echo ----------------hold1----------------------------"
#   2:
#     command: "echo ----------------hold2----------------------------"
#   3:
#     command: "echo ----------------hold3----------------------------"
  4:
    sendkey: "PLAYPAUSE"

plugin:
  inputs:
    libinput_command_input:
      enable-tap: true
      verbose: true
      show-keycodes: true

But even if dont use sendkey in config, i get same error

HritwikSinghal commented 3 years ago

Interestingly, installing fusuma-plugin-sendkey from AUR fixes this issue. i used yay ruby-fusuma-plugin-sendkey and now everything is OK. maybe there is some issue in gem version.

Edit: I looked at deps that were installed with ruby-fusuma-plugin-sendkey and it installed

So maybe we have to install these along sendkey

iberianpig commented 3 years ago

Hi @HritwikSinghal

I checked the install process on system wide, but I cannot found have any problem.

iberianpig@iberianpig-XPS-13-9310:~$ sudo gem install fusuma-plugin-sendkey
Fetching fusuma-1.11.1.gem
Fetching fusuma-plugin-sendkey-0.5.1.gem
Fetching revdev-0.2.1.gem
Successfully installed fusuma-1.11.1
Building native extensions. This could take a while...
Successfully installed revdev-0.2.1                                   ←  Look! Installing revdev here
Successfully installed fusuma-plugin-sendkey-0.5.1
Parsing documentation for fusuma-1.11.1
Installing ri documentation for fusuma-1.11.1
Parsing documentation for revdev-0.2.1
Installing ri documentation for revdev-0.2.1
Parsing documentation for fusuma-plugin-sendkey-0.5.1
Installing ri documentation for fusuma-plugin-sendkey-0.5.1
Done installing documentation for fusuma, revdev, fusuma-plugin-sendkey after 0 seconds
3 gems installed

revdev is installed with $ sudo gem install fusuma-plugin-sendkey

HritwikSinghal commented 3 years ago
* However, perhaps you have installed fusuma or fusuma-plugin-sendkey as a bundler-managed Gem using the bundle command instead of `gem install`.

No, i installed via gem install And this issue occured for first time with me also. Maybe its due to Manjaro, so thats why i only added revdev for arch based distros in PR