Telling an app to ignore all keyboard/mouse etc. events lazarus / 31-LCL ---------------------------------------------------------------------- MarkMLl · 2022-03-18 14:27 Is there a generic way of decoupling an app from standard input devices, so that it can be controlled entirely over e.g. a local Telnet link? Application is "semi-kiosk" or "appliance" and I anticipate control via front panel buttons and/or some sort of presentation controller. MarkMLl ---------------------------------------------------------------------- Thaddy · 2022-03-18 14:44 The sure way is to physically remove mouse and keyboard. This will keep them working over an ssh connection. I would not use telnet for that. The above applies to a lot of my Raspberry Pie applications. ---------------------------------------------------------------------- SymbolicFrank · 2022-03-18 14:53 You can make an OnKeyPress in the main form and clear the keys there and do something like that for the mouse. Or change the message loop and remove all the events you don't like (you have to reply that they're handled, of course). ---------------------------------------------------------------------- MarkMLl · 2022-03-18 15:07 Ah yes... discard events at the form level. TFT. Not really something that could fairly be done by fiddling with plastered-over plumbing, since I don't want to intrude too deeply into a preexisting project: I was hoping to be able to insert a limited number of hooks using a dynamically-loaded library. MarkMLl ---------------------------------------------------------------------- Thaddy · 2022-03-18 16:05 Well, hooks are possible, but then you will have to tie them to the connection... ---------------------------------------------------------------------- Josh · 2022-03-18 16:21 hi depending on your controls. ie if there looks is significantly different when disabled; you could use the form1.enabled:=false; this would disable all controls even the close button and ability to resize form. or if your controls are all in same panel enabled=false the panel, same caveats except you can resize form and the close button works. might not be ideal, but if your controls are custom ones where you can control the look, you could set the enabled state to mimic the enabled state. ---------------------------------------------------------------------- MarkMLl · 2022-03-18 16:31 TFT, worth considering although GOK what the implications would be if there were dialogues etc. that popped up (even if they were being filled by non-GUI activity). MarkMLl ---------------------------------------------------------------------- MarkMLl · 2022-03-24 13:07 Quote from: Thaddy on March 18, 2022, 03:44:52 pmThe sure way is to physically remove mouse and keyboard. This will keep them working over an ssh connection. I would not use telnet for that. The above applies to a lot of my Raspberry Pie applications. OK, call it "raw TCP" if it makes you feel better :-) This would be for strictly same-machine use, and I don't think it's any worse than GOK how many "perfessional" IPC schemes. Add to that that I really wouldn't want to attempt to graft something of the complexity of SSH onto an app that already has its own idea of how to talk to sundry remote servers. MarkMLl