[a / b / c / d / e / f / g / gif / h / hr / k / m / o / p / r / s / t / u / v / vg / vm / vmg / vr / vrpg / vst / w / wg] [i / ic] [r9k / s4s / vip] [cm / hm / lgbt / y] [3 / aco / adv / an / bant / biz / cgl / ck / co / diy / fa / fit / gd / hc / his / int / jp / lit / mlp / mu / n / news / out / po / pol / pw / qst / sci / soc / sp / tg / toy / trv / tv / vp / vt / wsg / wsr / x / xs] [Settings] [Search] [Mobile] [Home]
Board
Settings Mobile Home
/g/ - Technology


Thread archived.
You cannot reply anymore.


[Advertise on 4chan]


File: IMG_20260218_074353_195.jpg (77 KB, 720x1280)
77 KB
77 KB JPG
How do I do a global keyboard hook on Linux in C?
>>
I need a sensei ;A;
>>
>>108275908
stop breaking into peoples houses Jamal
>>
>>108275908
Download someone else's FOSS implementation then monitor them so you know to switch away if they have the wrong opinions.
>>
>>108275929
Huh

>>108275916
What
>>
>>108275908
You can just read keyboard events out of /dev/
>>
>>108275908
With or without superuser privileges? With superuser you can use evdev to get raw keyboard events. Without you can use xlib or xcb.
>>
>>108277998
If he wants to "hook" the events that probably means he wants the event to do something and not send a keycode, which necessitates uinput probably



[Advertise on 4chan]

Delete Post: [File Only] Style:
[Disable Mobile View / Use Desktop Site]

[Enable Mobile View / Use Mobile Site]

All trademarks and copyrights on this page are owned by their respective parties. Images uploaded are the responsibility of the Poster. Comments are owned by the Poster.