Skip to content

Keyboard input - e.g. Gesture for Ctrl_W #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
ben2talk opened this issue Sep 19, 2023 · 2 comments
Open

Keyboard input - e.g. Gesture for Ctrl_W #23

ben2talk opened this issue Sep 19, 2023 · 2 comments

Comments

@ben2talk
Copy link

I tried this software, and discovered it works for drawing an 'f' to execute the command 'firefox -p' to launch Firefox - that's great.

I can see also that it would work for launching scripts, so
a script to check/kill or launch an application should be easy to enter as a Command ~/Admin/strawberry.sh

However, many 'gestures' I use are simply keyboard shortcuts... like Tab: Close Ctrl_W Reopen Sh_Ctrl_N Overview Alt+F11 set in shortcuts etc. and I cannot figure out how to change 'command' to 'keyboard'.

@havard-ffi
Copy link

If you are on X11 you can use the program xdotool in a command to preform a keyboard shortcut.

Ex: xdotool key ctrl+w will preform Ctrl+W

@ben2talk
Copy link
Author

Ok, making some progress now...
I'm using ydo tool, but it's not easy to input commands, so I'm using scripts.

#!/usr/bin/env bash

YDOTOOL_SOCKET="$HOME/.ydotool_socket" ydotool key 29:1 17:1 29:0 17:0

# Ctrl+W to close a tab. (see /usr/include/linux/input-event-codes.h for available codes)
# KEY_W		17
# KEY_LEFTCTRL	29

This works well.

Now the main issue is that the 'shape' key is denied, so I have no middle mouse button function on my desktop (for example, middle-click scrolling Firefox).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants