#StackBounty: #touchpad #xdotool #libinput Fusuma not working on Ubuntu 18.04

Bounty: 50

I have Ubuntu 18.04 on Dell Vostro 15 – 3546.

uname -api

Linux vaishnavi-laptop 4.15.0-117-generic #118-Ubuntu SMP Fri Sep 4 20:02:41 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

I followed this post to install fusuma. Then when I run sudo fusuma:

I, [2020-09-15T09:45:33.978824 #15466]  INFO -- : reload config: /home/vaishnavi/.config/fusuma/config.yml
I, [2020-09-15T09:45:34.051674 #15466]  INFO -- : ---------------------------------------------
I, [2020-09-15T09:45:34.051794 #15466]  INFO -- : Fusuma: 1.11.1
I, [2020-09-15T09:45:34.061094 #15466]  INFO -- : libinput: 1.10.4
I, [2020-09-15T09:45:34.143106 #15466]  INFO -- : OS: Linux 4.15.0-117-generic #118-Ubuntu SMP Fri Sep 4 20:02:41 UTC 2020
I, [2020-09-15T09:45:34.145421 #15466]  INFO -- : Distribution: Ubuntu 18.04.4 LTS n l
I, [2020-09-15T09:45:34.147262 #15466]  INFO -- : Desktop session:
I, [2020-09-15T09:45:34.147340 #15466]  INFO -- : ---------------------------------------------
I, [2020-09-15T09:45:34.147393 #15466]  INFO -- : Enabled Plugins: 
I, [2020-09-15T09:45:34.147612 #15466]  INFO -- :   Fusuma::Plugin::Buffers::GestureBuffer
I, [2020-09-15T09:45:34.147659 #15466]  INFO -- :   Fusuma::Plugin::Detectors::PinchDetector
I, [2020-09-15T09:45:34.147692 #15466]  INFO -- :   Fusuma::Plugin::Detectors::RotateDetector
I, [2020-09-15T09:45:34.147729 #15466]  INFO -- :   Fusuma::Plugin::Detectors::SwipeDetector
I, [2020-09-15T09:45:34.147764 #15466]  INFO -- :   Fusuma::Plugin::Events::Records::GestureRecord
I, [2020-09-15T09:45:34.147804 #15466]  INFO -- :   Fusuma::Plugin::Events::Records::IndexRecord
I, [2020-09-15T09:45:34.147948 #15466]  INFO -- :   Fusuma::Plugin::Events::Records::TextRecord
I, [2020-09-15T09:45:34.147979 #15466]  INFO -- :   Fusuma::Plugin::Executors::CommandExecutor
I, [2020-09-15T09:45:34.148008 #15466]  INFO -- :   Fusuma::Plugin::Filters::LibinputDeviceFilter
I, [2020-09-15T09:45:34.148039 #15466]  INFO -- :   Fusuma::Plugin::Filters::LibinputTimeoutFilter
I, [2020-09-15T09:45:34.148081 #15466]  INFO -- :   Fusuma::Plugin::Inputs::LibinputCommandInput
I, [2020-09-15T09:45:34.148119 #15466]  INFO -- :   Fusuma::Plugin::Parsers::LibinputGestureParser
I, [2020-09-15T09:45:34.148177 #15466]  INFO -- : ---------------------------------------------

I didn’t miss any step nor did I close the terminal, but still touchpad gestures don’t work!
Thanks in advance.


Get this bounty!!!

#StackBounty: #x11 #keyboard-shortcuts #c #xdotool #xcb key binding running xdotool unexpected behaviour

Bounty: 50

I’ve programmed a key to run xdotool when it’s pressed. But for some unknown reason xdotool is only sending keystrokes when the binded key is released, except when a non-active window is sent the keystrokes with –window, in which case it (as I would like it to do for the active window instead) sends the keystrokes as the binded key is pressed as well as repeatly when held down.

Example code with the issue:

#include <stdio.h>
#include <stdlib.h>
#include <xcb/xcb.h>

int main() {
    xcb_connection_t *connection = xcb_connect(NULL, NULL);

    xcb_screen_t *screen = xcb_setup_roots_iterator(xcb_get_setup(connection)).data;

    xcb_grab_key(connection, 1, screen->root, XCB_NONE, 65, XCB_GRAB_MODE_ASYNC, XCB_GRAB_MODE_ASYNC);  // 65=space (on mine at least)

    xcb_flush(connection);

    xcb_generic_event_t *event;
    while ( (event = xcb_wait_for_event(connection)) ) {
        switch (event->response_type & ~0x80) {
            case XCB_KEY_PRESS: {

                // UNCOMMENT ONE OF THE LINES BELOW
                // system("xdotool key q");  // only on release :(
                // system("xdotool getactivewindow key --window %1 q");  // only on release :(
                // system("xdotool key --window 18874376 q");  // (replace 18874376 with one of your window's id, could use 'xdotool getactivewindow') works perfectly for me but only if the specified window is not active :(

                break;
            }
        }
        free(event);
    }
}

Please note above doesn’t work with modifiers on, including Num Lock.

To compile it:

gcc c.c -lxcb

Do you experience the same and how do I get what I want?


Get this bounty!!!

#StackBounty: #18.04 #gnome-shell #xdotool Why is there a delay when typing certain characters with xdotool in 18.04?

Bounty: 50

Using xdotool type or xdotool key with certain characters makes Gnome Shell lock up. For example typing a single slash with xdotool type / or xdotool key slash takes a second or two, but for something like 23 slashes (i.e. xdotool type ///////////////////////) it’s more than 25 seconds.

Of all the printable ASCII characters, only these cause the problem:

  • slash /
  • backslash
  • bar |
  • bracketleft [
  • bracketright ]
  • braceleft {
  • braceright }

Outside ASCII, I’ve only tested çé°†, but they also cause the problem.

Why does this happen and how can I fix it?

More details

I never had this problem in Unity on 14.04.

There is a small delay when typing other characters, but only up to a second, even for long strings.

Any timing I’ve done in the terminal has come back normal, like time xdotool type ... or t=$SECONDS; xdotool ...; echo $((SECONDS-t)), so it seems to be a problem on Gnome Shell’s side.

I’ve confirmed $XDG_SESSION_TYPE is x11.


Get this bounty!!!