What about hooking e.g. keyboard event? lazarus / 8-Other ---------------------------------------------------------------------- Girla · 2005-12-01 21:57 Is exists any method to hook keyboard event, etc? Or it's non- crossplatform coding only required(e.g. target OS API using)? For example, can hook, remould or simulate keyboard event application that runing but has non-focused form(e.g. minimize)? Thanks. ---------------------------------------------------------------------- JanH · 2005-12-02 06:26 What about the windows function RegisterHotKey? But crossplatforming I have no idea. ---------------------------------------------------------------------- Marc · 2005-12-02 14:43 There is no way to hook global the keyboard, except using win32 api hook functions directly. What do you want to do ? ---------------------------------------------------------------------- Girla · 2005-12-25 10:13 I need control the application that has non-focused window (e.g. On Top) from keyboard: watch(listen) movie(audio) player, control it (play, pause, seek) but use text processor in this time for transcribe this video or audio. And need global hook e.g. TAB button so that only player react to it, but nothing type in text processor. I know how do it with using win32 api directly and already have this solution, but cross-platform application need. Now X11 study, but don't know what I'll find and can I'll find anything. For my opinion it's a good feature to have capability for global hooking control devices(keyboard, mouse) in fpc, even through dll/so. Dreams, dreams ... One question: What about Fpc keyboard unit that "Access to low-level keyboard functions"? What I'll can do with it? ---------------------------------------------------------------------- Marc · 2005-12-27 10:47 The FPC keyboard unit is only for console applications. Don't use it with lazarus. Maybe you can use set the keypreview on for your (main)form (form.Keypreview = True) and handle the key in OnKeyDown/OnKeyUp. setting the key there to 0 prevents that it is passed to the control. ---------------------------------------------------------------------- Girla · 2005-12-27 13:02 Thank you, Marc. But it can't be solution in my case, because I have two different applications: Player(more exactly: GUI Front-end, writed on Lasarus by me) and text processor (e.g MS Word, OpenOffice.org Writer). I work in text processor and watch On Top but non-focused Player, and need control player from keyboard "by fly", not stop typing(for set focus to Player for instance). Embeded macros languages in text pocessors can't give me this, and I can changing it (it's not solution from begining). Only way, as I think, is realize global keyboard hook in Player. In Win32 I use Win32 API hook functions, but cross-platform application needed... OK... Will go to buy new tambourine...