[SOLVED] MouseWheel on linux lazarus / 32-Linux ---------------------------------------------------------------------- Huhims · 2020-02-10 17:58 how to generate MouseWheel (up/down) to outside of my program? I can't find any clear examples for linux on internet. for example: i want to scroll firefox page with my program. using timer for example.... .. what I need to add to my project... or no need to add anything..? linux mint 19.3 lazarus 2.0.6 fpc3.0.4 ---------------------------------------------------------------------- sash · 2020-02-12 22:20 I have been done similar thing (but for joysticks) at the low level: basically you have to send messages to /dev/input/your-mouse-device (with uinput). But this probably requires (in addition to your app) root and/or some manipulations with udev rules. Also, there should be something at x-server level, like X11/Xlib. Alternatively you could use external application like xdotool. They say it can send events directly to interesting gui process. ---------------------------------------------------------------------- Huhims · 2020-02-17 17:57 xdotool not really what I'd like, but it's better than nothing  txnks bro! procedure TForm1.Timer1Timer(Sender: TObject); var   Arg1 : Pchar = 'click 4'; begin  SysUtils.ExecuteProcess(('/usr/bin/xdotool'), Arg1, []); end; works... ---------------------------------------------------------------------- sash · 2020-02-18 11:42 Quote from: Huhims on February 17, 2020, 06:57:16 pmxdotool not really what I'd like, but it's better than nothing  Well, (probably) you could improve it, by not using external process: looks like there's `libxdo[-dev]` packages, which (I think) actually contain needed api, if you know how to use C <-> Pascal bindings: /usr/include/xdo.h - you need to translate header to Pascal (not all, but just few actually required functions, maybe some dependent structures) /usr/lib/x86_64-linux-gnu/libxdo.so - you need to link it.