Comments (8)
Thank you for your interest in the project, I will look into the following keys and implement them tomorrow.
from swhkd.
Hi are you talking about this key? I see quite a few under display and I don't know what function the key serves.
from swhkd.
https://docs.rs/evdev/latest/src/evdev/scancodes.rs.html
Found nothing under the name launch, maybe it's under some other name? if you can find it above I can bind it.
If it's not in that list, I can't bind that key.
from swhkd.
From what evtest tells me, the key for XF86Launch1 is KEY_PROG1
, and for XF86Display is KEY_SWITCHVIDEOMODE
though I can't use them by default on my Thinkpad with swhkd because of this check:
Line 345 in 04e5125
Both keys are in a separate device to the keyboard which does not contain an enter key:
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x17aa product 0x5054 version 0x4101
Input device name: "ThinkPad Extra Buttons"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 113 (KEY_MUTE)
Event code 114 (KEY_VOLUMEDOWN)
Event code 115 (KEY_VOLUMEUP)
Event code 120 (KEY_SCALE)
Event code 140 (KEY_CALC)
Event code 142 (KEY_SLEEP)
Event code 144 (KEY_FILE)
Event code 148 (KEY_PROG1)
Event code 152 (KEY_SCREENLOCK)
Event code 156 (KEY_BOOKMARKS)
Event code 158 (KEY_BACK)
Event code 171 (KEY_CONFIG)
Event code 173 (KEY_REFRESH)
Event code 190 (KEY_F20)
Event code 191 (KEY_F21)
Event code 194 (KEY_F24)
Event code 205 (KEY_SUSPEND)
Event code 212 (KEY_CAMERA)
Event code 217 (KEY_SEARCH)
Event code 224 (KEY_BRIGHTNESSDOWN)
Event code 225 (KEY_BRIGHTNESSUP)
Event code 227 (KEY_SWITCHVIDEOMODE)
Event code 228 (KEY_KBDILLUMTOGGLE)
Event code 236 (KEY_BATTERY)
Event code 237 (KEY_BLUETOOTH)
Event code 238 (KEY_WLAN)
Event code 240 (KEY_UNKNOWN)
Event code 372 (KEY_ZOOM)
Event code 374 (KEY_KEYBOARD)
Event code 444 (?)
Event code 445 (?)
Event code 446 (?)
Event code 466 (KEY_FN_F1)
Event code 475 (KEY_FN_F10)
Event code 476 (KEY_FN_F11)
Event code 485 (?)
Event code 582 (KEY_VOICECOMMAND)
Event code 592 (KEY_BRIGHTNESS_MIN)
Event code 634 (?)
Event type 4 (EV_MSC)
Event code 4 (MSC_SCAN)
Event type 5 (EV_SW)
Event code 3 (SW_RFKILL_ALL) state 1
Properties:
Testing ... (interrupt to exit)
If that check is modified so that this device is recognized as a keyboard by swhkd, KEY_PROG1
and KEY_SWITCHVIDEOMODE
work.
(The modification I did for testing was just returning true except for swhkd virtual output devices, but that disabled my mouse :P )
from swhkd.
(The modification I did for testing was just returning true except for swhkd virtual output devices, but that disabled my mouse :P )
That is because we use that function to get valid keyboard and then call kernel grab syscall, so when you hardcoded true, it grabbed your mouse too.
If that check is modified so that this device is recognized as a keyboard by swhkd, KEY_PROG1 and KEY_SWITCHVIDEOMODE work.
Understood. Do you have any ideas for better keyboard checking? Checking for key_enter is definitely not ideal.
from swhkd.
Maybe detecting if something is not a keyboard? (Detecting if it's a mouse or joystick, etc.)
The only other type of detection I can think of is checking if it supports any possibly grabbable keys.
from swhkd.
Maybe detecting if something is not a keyboard? (Detecting if it's a mouse or joystick, etc.)
Doesn't sound robust due to a couple reasons:
- We would need to hard code multiple device states.
- A lot of input devices share common characteristics such as buttons.
- Evdev also handles output devices so we would need to write cases for them too.
from swhkd.
The only other type of detection I can think of is checking if it supports any possibly grabbable keys.
Afaik, key's aren't grab-able, output/input devices are.
from swhkd.
Related Issues (20)
- `swhkd-bin` not maintained - AUR!
- Keyboard stops working after running `pkexec swhkd` HOT 6
- How to express this sxkhd underscore-range idiom in swkhd?
- `XDG_RUNTIME_DIR` is not a typo HOT 1
- `/dev/input/mouse1`: Inappropriate ioctl for device HOT 10
- compositor pkexec swhkd invocation is buggy
- documentation for multiple config loading
- pkexec alternative ?
- Can't compile (make: rustup: No such file or directory make: *** [Makefile:61: setup] Error 127) HOT 2
- Systemd service won't start HOT 2
- swhkd doesn't compile, returns Makefile 25 error HOT 10
- Proposal: Better Path handling Mechanisms HOT 3
- Mouse events occur twice HOT 2
- [enchancement] Add Path Validations to Environment Variables
- feat: generate default config HOT 1
- [enchancement] Fork into SWHKS when not detected HOT 3
- Swhks stops after login HOT 5
- Use rust build scripts/GH integration instead of Makefile
- compatibility with hyprland HOT 1
- XF86AudioStop not being recognized HOT 1
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 swhkd.