Comments (3)
Thanks! I think we need to look into what xinput does under the good, and find out if we can query this mapping through some API in Xinput2. If so there shouldn't be any reason why we can't respect the mapping.
from unclutter-xfixes.
Relevant code from xinput: https://cgit.freedesktop.org/xorg/app/xinput/tree/src/buttonmap.c
The button map is actually device specific. We can use XGetDeviceButtonMapping
to get the map, and I think the raw event has a deviceid
property.
Edit: Also, just for reference, here's the XI2 spec: https://www.x.org/releases/X11R7.7/doc/inputproto/XI2proto.txt
from unclutter-xfixes.
Approach-wise, we can do the following:
static bool is_button_ignored(const XIRawEvent *data) {
if (config.ignore_scrolling && (data->detail == 4 || data->detail == 5)) {
return true;
}
if (config.ignore_buttons.count == 0) {
// Return early so we don't query the mapping unless needed
return false;
}
long mapped_button = /* … Get mapping of data->detail … */
// …
}
I think for --ignore-scrolling
we should not map the 4
/ 5
as I believe those should always be interpreted as scroll wheel – I'm not entirely sure, to be honest, though. Even if so, the user could always ignore scrolling respecting the mapping by using --ignore-buttons
instead then.
from unclutter-xfixes.
Related Issues (20)
- --timeout option not respected (i3wm) HOT 3
- When used with multiple pointers, there is no distinction between them.
- --ignore-scrolling does not work with gentoo HOT 16
- Question regarding XFixesHideCursor HOT 1
- Readme and manual page should be rewritten HOT 3
- Cursor still displayed when screen sharing HOT 5
- [Feature Suggestion] custom jitter for window match HOT 9
- How does it works? HOT 11
- Wayland support HOT 5
- Move cursor to the center of the screen on reappearing HOT 2
- Cursor does not move after suspend HOT 1
- Enhancement: hide on key press HOT 11
- Does not work well with multiple pointers HOT 1
- Screenshotting part of the screen using imagemagick's import is hard HOT 7
- Doesn't always hide the cursor (touchscreen) HOT 2
- Version in Debian Repositories is out of date HOT 3
- Autostart via Xsession does not work under Wayland HOT 2
- apt installs just version 1.5 HOT 3
- Disable timeout while retaining hide-on-touch functionality HOT 3
- Enhancement: add a delay time for the mouse to turn on again
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unclutter-xfixes.