Mouse movements/hooks work, but mouse clicks do not. (kubuntu cosmic 18.10, KDE/Plasma)
See original GitHub issueTitle.
The test case is as simple as:
~/mouse (master|✔) $ sudo python3
Python 3.6.7 (default, Oct 22 2018, 11:32:17)
[GCC 8.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import mouse
>>> mouse.move(50, 50) ## works
>>> mouse.click() ## nothing happens?
>>> ## no error
(alongside this, mouse.wait()
and mouse.record()
work, but mouse.replay()
will replay movements but not clicks)
(the mouse
directory is a fresh clone of this repository)
I’m not intimately familiar with how mouse
interacts with linux on an i/o level, so i’m going to attempt to provide as much useful information as possible. Let me know what specific information you’d need about my environment.
This is a relatively vanilla installation of kubuntu:
~ $ apt list --installed | grep input
WARNING: apt does not have a stable CLI interface. Use with caution in scripts.
inputattach/cosmic,now 1:1.6.0-2 amd64 [installed,automatic]
libinput-bin/cosmic,now 1.12.1-1 amd64 [installed,automatic]
libinput10/cosmic,now 1.12.1-1 amd64 [installed,automatic]
libwinpr-input0.1/cosmic,now 1.1.0~git20140921.1.440916e+dfsg1-15ubuntu1 amd64 [installed,automatic]
xinput/cosmic,now 1.6.2-1build1 amd64 [installed,automatic]
xserver-xorg-input-all/cosmic,now 1:7.7+19ubuntu8 amd64 [installed,automatic]
xserver-xorg-input-libinput/cosmic,now 0.28.1-1 amd64 [installed,automatic]
~ $ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.10
Release: 18.10
Codename: cosmic
~ $
With the standard KDE window manager.
Nothing appears in dmesg except for the input: Virtual Keyboard as /devices/virtual/input/input##
messages.
Issue Analytics
- State:
- Created 4 years ago
- Comments:7
Top Results From Across the Web
Mouse clicks not registered above panel
I just installed a fresh copy of Kubuntu 12.04 (KDE 4.8.2) on my desktop. I was previously using 11.10, which worked perfectly fine....
Read more >Mouse clicks not registering in KDM/KDE : r/Kubuntu
The only remedy is to switch to a Terminal via e.g. CTRL+ALT+F2, then (without doing anything there) switching back to KDE via CTRL+ALT+F1. ......
Read more >mouse
Hook and simulate global mouse events in pure Python. Become a Bounty Hunter ... Mouse movements/hooks work, but mouse clicks do not. (kubuntu...
Read more >KDE plasma right mouse click dead end problem [closed]
Since I made the change entering the now lost menu and I can not find it elsewhere in the system settings, I find...
Read more >Bug #1795292 “ELAN469D touch pad not working”
I installed Bionic Beaver and now upgraded to Cosmic Cuttlefish on this Lenovo Ideapad 330S-15ARR laptop. The touch pad doesn't work in either....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I reproduced this as well. I tracked it down by reading the code and seeing that on POSIX systems the library is using the uinput module. After creating a sample program based on this blog post I was able to figure out that the issue comes down to this call:
I’m not sure why this is necessary. In my sample C program the analagous call is:
Where
BTN_LEFT
on my system is defined as0x00000110
. This means I can replace the Python code with:…and button clicks work again.
I’d submit a PR if I knew this was stable on other systems, but I don’t know that for sure.
Can confirm this fixes the issue (Linux Manjaro user here), thanks for your investigation and help! 😃