Gary Duzan via plug on 1 Aug 2019 14:01:54 -0700 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [PLUG] Catching mouse events in a character app |
If your terminal is mouse-aware, ncurses can grab mouse events: https://www.tldp.org/HOWTO/NCURSES-Programming-HOWTO/mouse.html Gary => I have a character-mode app running in a terminal in an X session (I'm => currently working in lxterminal in an LXDE session, but it could be any => terminal emulator under any Linux window manager). xev seems to give me => the => mouse events, but requires the Xwindow id to be specified. There seems to => be no easy way to capture the Xwindow id of a terminal session. => => Is there a reliable way for a program running in an X terminal session to => get the Xwindow id? Or better yet, is there a straightforward way to get => mouse events that happen in that application's window? => => Searches on DuckDuckGo have not turned up any useful links â the => reliable => solutions mentioned involve convoluted computation, and the easy solutions => are not reliable. => => Thank you very much. => => Regards => â Bhaskar => ___________________________________________________________________________ => Philadelphia Linux Users Group -- => http://www.phillylinux.org => Announcements - => http://lists.phillylinux.org/mailman/listinfo/plug-announce => General Discussion -- => http://lists.phillylinux.org/mailman/listinfo/plug => ___________________________________________________________________________ Philadelphia Linux Users Group -- http://www.phillylinux.org Announcements - http://lists.phillylinux.org/mailman/listinfo/plug-announce General Discussion -- http://lists.phillylinux.org/mailman/listinfo/plug