Coder Social home page Coder Social logo

gestures's People

Contributors

flisoch avatar natask avatar ohthehugemanatee avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gestures's Issues

[Question] Does gestures support clockwise & anticlockwise gestures for 2/3/4 fingers?

Hi, greetings!

The question is as the title. Does gestures support rotate-like gestures?

I couldn't find anything related in the readme page in this repo.

It's awkward, neither of the gesture programs that I found are feature-complete to use for wayland.

Libinput-gestures is complete for all the gestures but lacks continuous functionality, or said threshold for each command of a gesture to execute. The dev of it is also not willing to implement it, sadge :(

Fusuma, on the other hand, finally has the threshold setting for each gesture, but lacks slanted gestures, such as right/left_up and right/left_down. I posted a related issue on fusuma's repo, but it's been probably three weeks long, still no any good news :( Here's the post: iberianpig/fusuma#310

Gestures, however, probably lacks rotate(clockwise) gestures. What a pain in the ass :)

Script Stops Working after Pinch Events

Hello,

Many thanks for the work you have carried out. It is a brilliant script.

I installed the script without problems and it is working fine when I turn my laptop on. However, as soon as I do a pinch event on the touchscreen in Chrome or the file manager to zoom, all other touch events on the touchscreen cease to work. If I do a single-finger event on the touchscreen (like scrolling) then the script continues to operate as usual. I am using the default configuration file with no pinch events programmed. The touchpad continues to operate fine.

I am using Kubuntu 19.10. I sense that the operating system and the script are interfering with one another. When I first try to zoom there is a small bit of lag before the operating system causes zooming. Is there a way to disable the two finger pinch on the script for the touchscreen only?

I then kill the script and restart it - it subsequently works again.

Please could you advise?

more robust device matching

Is your feature request related to a problem? Please describe.
Current device matching is not robust. It checks for keywords that aren't garrentied to match touchpads or touchscreens.

Describe the solution you'd like
leverage udevadm test-builtin input_id ${PATH} on all entries in /proc/bus/input/devices and check if ID_INPUT_TOUCHPAD or ID_INPUT_TOUCHSCREEN is set. can make the lookup more specific by only applying it to devices With Handlers=mouse.

Describe alternatives you've considered
It maybe possible to use KEY=4000 .* or KEY=e520 .* of /proc/bus/input/devices to match touchscreens and touchpads respectively. I am not sure if this matches to all devices though.

Annoying Behaviour when Dragging

There is annoying behaviour present when selecting text in the following way:

I click the touchpad with my left finger, and then select text on Chrome by dragging my right finger along the touchpad (whilst keeping my left finger still pressed on the trackpad). This results in a pinch action.

Is there any way to disable the pinch action if the touchpad has been clicked first? I only want the pinch action to occur if I'm dragging the touchpad, without clicking it.

Config file location

Hello,

I just installed this script on Kubuntu 20.04 and all the default gestures works fine. But where is the config file placed so I can edit the defaults? Also why is it placing in the root directory there is nothing there.

Thank you

Screenshot

Throws errors unless config file has a lot of empty keys

Describe the bug
If your config file only includes the gestures you want, gestures will throw errors because of keystrokes that aren't present.

The only way to avoid it is to use the full config file and empty out all the values you don't want.

To Reproduce

  1. Use this minimal configuration:
{
  'pinch_deadzone_enabled': 'False',
  'touchpad': {
    'pinch_deadzone_enabled': 'False',
    'pinch': {},
    'swipe': {
      '3': {
        't': [
          
        ],
        'l': {
          'start': [
            'evemu_do keydown leftmeta',
            'evemu_do keydown alt',
            "evemu_do key left"
          ],
          'end': [
            'evemu_do keyup alt',
            'evemu_do keyup leftmeta'
          ]
        },
        'r': {
          'start': [
            'evemu_do keydown leftmeta',
            'evemu_do keydown alt',
            "evemu_do key right"
          ],
          'end': [
            'evemu_do keyup alt',
            'evemu_do keyup leftmeta'
          ]
        }
      }
    }
  },
  'touchscreen': {
    'pinch_deadzone_enabled': 'False',
    'pinch': {},
    'swipe': {
      '3': {
        't': [    
        ],
        'l': {
          'start': [
            'evemu_do keydown leftmeta',
            'evemu_do keydown alt',
            "evemu_do key left"
          ],
          'end': [
            'evemu_do keyup alt',
            'evemu_do keyup leftmeta'
          ]
        },
        'r': {
          'start': [
            'evemu_do keydown leftmeta',
            'evemu_do keydown alt',
            "evemu_do key right"
          ],
          'end': [
            'evemu_do keyup alt',
            'evemu_do keyup leftmeta'
          ]
        }
      }
    }
  }
}
  1. Try pinching with two fingers
  2. observe error:
Exception in thread Thread-4:
Traceback (most recent call last):
  File "/usr/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "/usr/local/bin/gestures", line 96, in run
    self.__getattribute__(event["type"])(event);
  File "/usr/local/bin/gestures", line 192, in finger_update
    self.enqueue();
  File "/usr/local/bin/gestures", line 386, in enqueue
    self.gesture_queue.extend(map(lambda x: shlex.split(x), self.gestures[structure.type][structure.fingers][structure.direction][structure.event]));
KeyError: '2'

Expected behavior
The lack of specific config should produce no output unless in debug mode.

Actual behavior
Exception is produced in the thread.

Debugging
Not relevant.

Additional context
Not relevant.

Use with Surface Pro Touch Screen

I discovered this project while looking for a solution for touchscreen gestures on my Surface Pro 6. While it works fantastically on the trackpad, nothing changes about the behavior of the touch screen.

The touch screen currently functions inside of Plasma, and all of my fingers are recognized within libinput debug-gui. Here is the device as outputted by libinput list-devices:

Device:           IPTS Touch
Kernel:           /dev/input/event13
Group:            5
Seat:             seat0, default
Size:             259x171mm
Capabilities:     touch
Tap-to-click:     n/a
Tap-and-drag:     n/a
Tap drag lock:    n/a
Left-handed:      n/a
Nat.scrolling:    n/a
Middle emulation: n/a
Calibration:      identity matrix
Scroll methods:   none
Click methods:    none
Disable-w-typing: n/a
Accel profiles:   n/a
Rotation:         n/a

Other specs
Version: git master; brand new install
Kernel: 5.8.6-arch1-1-surface.
Desktop environment: KDE Plasma
Please let me know if there is any more information I can provide.

Is there anything that I can do right now to get gesture support to work with my touch screen? In the case that the device isn't supported right now, I hope that you will consider it. I was excited to find this project; it is the only one I've come across so far that explicitly mentions touch screens as one of its use cases, so I'm hopeful. :)

Program doesn't work on openSUSE

When installed on openSUSE, the program refuses to start


Previous comment:

Describe the bug
When running install script, it doesn't use zypper to install dependencies.

To Reproduce
Use openSUSE, run install.sh

Expected behavior
Dependencies should be installed using zypper.

Actual behavior
Log is full of dnf errors due to the lack of repository.

Debugging

╰─$ ./install.sh 
Installing evtest, daemonize, evemu, evemu-tools, python3-pip, python-pip, xdotool, xkbset.
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value

Installing evtest
[sudo] password for root: 
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing daemonize
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing evemu
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing evemu-tools
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing python3-pip
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing python-pip
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing xdotool
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".

Installing xkbset
Error: There are no enabled repositories in "/etc/dnf/repos.d", "/etc/yum.repos.d", "/etc/yum/repos.d", "/etc/distro.repos.d".
Installing pathlib, simplejson.
xargs: warning: options --max-args and --replace/-I/-i are mutually exclusive, ignoring previous --max-args value

Installing pathlib through pip
Collecting pathlib
  Downloading pathlib-1.0.1.tar.gz (49 kB)
     |████████████████████████████████| 49 kB 7.2 kB/s 
Using legacy 'setup.py install' for pathlib, since package 'wheel' is not installed.
Installing collected packages: pathlib
    Running setup.py install for pathlib ... done
Successfully installed pathlib-1.0.1

Installing simplejson through pip
Collecting simplejson
  Downloading simplejson-3.17.2-cp38-cp38-manylinux2010_x86_64.whl (137 kB)
     |████████████████████████████████| 137 kB 2.4 kB/s 
Installing collected packages: simplejson
Successfully installed simplejson-3.17.2



Placing gestures getConfig.py in /usr/local/bin.


Should I install utilities, evemu_do, flip, killTouchpad, orientation, reset_keyboard, restartTouchpad,
restartTouchpadAndPen, save_and_close, set_orientation,
toggle_global_window_switcher, in /usr/local/bin? Recommended for default operation.
(y/n):y
Placing evemu_do, flip, killTouchpad, orientation, reset_keyboard, restartTouchpad,
restartTouchpadAndPen, save_and_close, set_orientation,
toggle_global_window_switcher in /usr/local/bin.


Would you like xdo-tool version (x or y) or evemu_do version (e or n)? xdo-tool version is recommended unless using wayland.
([x/y]do-tool/[e/n]vemu_do):e
Placing evemu_do version of config file in /home/golden/.config/.
cp: cannot stat '/home/golden/.config//gestures.conf': No such file or directory
./install.sh: line 89: break: only meaningful in a `for', `while', or `until' loop


Placing desktop file in /home/golden/.config/autostart.
Adding user golden to input group.
Adding user golden to group input
Starting gestures. Welcome!
Traceback (most recent call last):
  File "/usr/local/bin/gestures", line 814, in <module>
    subprocess.Popen(["daemonize", sys.argv[0], "execute"])
  File "/usr/lib64/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'daemonize'
╰─$ gestures                                                                             127 ↵
Traceback (most recent call last):
  File "/usr/local/bin/gestures", line 814, in <module>
    subprocess.Popen(["daemonize", sys.argv[0], "execute"])
  File "/usr/lib64/python3.8/subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib64/python3.8/subprocess.py", line 1702, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'daemonize'
╰─$ cat /etc/os-release 
NAME="openSUSE Tumbleweed"
# VERSION="20210205"
ID="opensuse-tumbleweed"
ID_LIKE="opensuse suse"
VERSION_ID="20210205"
PRETTY_NAME="openSUSE Tumbleweed"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:opensuse:tumbleweed:20210205"
BUG_REPORT_URL="https://bugs.opensuse.org"
HOME_URL="https://www.opensuse.org/"
DOCUMENTATION_URL="https://en.opensuse.org/Portal:Tumbleweed"
LOGO="distributor-logo"

Additional context
openSUSE uses rpm package but not rpm/dnf command line. dnf can be manually installed but it comes without RHEL repository.

Could you clarify how to launch gestures please ?

Hello, I am on Debian bullseye and I have installed gestures following the tutorial.
After rebook I thought that it would work out of the box but I can't use any gesture.
What is missing in my process ? Shall I open a terminal and launch something like "gestures" ?
Maybe your answer can be added to the readme if it is short ?

Thank you for your clarification.

Uninstall script

The Uninstall script when executed proceeds to remove almost everything including Firefox, shell and the system DE parts

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.