Forum > Linux
FPC/Lazarus input event monitoring
(1/1)
MarkMLl:
This question will make sense to anybody whose used the evtest program to monitor keyboard/mouse/joystick etc. events, it does not (I believe) refer to anything in the standard GUI stuff and is at a higher level than HID.
I have here a fairly ordinary RC controller, which may be connected to a computer via a 3.5mm plug and a USB dongle. Using the evtest program, I can see e.g.
--- Code: Text [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---Input device name: "KHOBBY KHOBBY"Supported events: Event type 0 (EV_SYN) Event type 1 (EV_KEY) Event code 288 (BTN_TRIGGER) Event code 289 (BTN_THUMB) Event code 290 (BTN_THUMB2) Event code 291 (BTN_TOP) Event code 292 (BTN_TOP2) Event type 3 (EV_ABS) Event code 0 (ABS_X) Value 122 Min 0 Max 255 Flat 15 Event code 1 (ABS_Y) Value 141 Min 0 Max 255 Flat 15 Event code 2 (ABS_Z) Value 123 Min 0 Max 255 Flat 15 Event code 3 (ABS_RX) Value 123 Min 0 Max 255 Flat 15 Event code 4 (ABS_RY) Value 124 Min 0 Max 255 Flat 15 Event code 40 (ABS_MISC) Value 0 Min 0 Max 255 Flat 15 Event type 4 (EV_MSC) Event code 4 (MSC_SCAN)Properties:Testing ... (interrupt to exit)Event: time 1693301224.598804, type 3 (EV_ABS), code 3 (ABS_RX), value 122Event: time 1693301224.598804, type 3 (EV_ABS), code 4 (ABS_RY), value 123Event: time 1693301224.598804, -------------- SYN_REPORT ------------Event: time 1693301224.614794, type 3 (EV_ABS), code 1 (ABS_Y), value 140Event: time 1693301224.614794, type 3 (EV_ABS), code 2 (ABS_Z), value 122...
I'd like to be able to monitor this and (e.g.) filter it to only display control changes for which I need to be able to interface to libevdev.
As an aside, this is also the API which underpins e.g. https://wiki.freepascal.org/Lazarus_IDE_with_Nostromo_Keypad_on_Linux
Before I go any further, has anybody worked with this using FPC in the past, or am I breaking new ground?
MarkMLl
Navigation
[0] Message Index