Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » How to set a global (system) keyboard hook?
Re: How to set a global (system) keyboard hook? [message #23135 is a reply to message #23134] Fri, 18 September 2009 08:01 Go to previous messageGo to previous message
tojocky is currently offline  tojocky
Messages: 607
Registered: April 2008
Location: UK
Contributor

luzr wrote on Fri, 18 September 2009 06:55



You have to use host platform API (Win32).

I guess this one is what you need:

http://msdn.microsoft.com/en-us/library/ms646309%28VS.85%29. aspx?ppud=4

Then put GetHWND of some of your TopWindows in there and override

virtual LRESULT Ctrl::WindowProc(UINT message, WPARAM wParam, LPARAM lParam);


(Do not forget to call TopWindow::WindowProc at the end).

Mirek


I'm interested in global(system)keyboard too.
but in linux how it can be realized? Is the standard method?
For X11 I found here:
int XGrabKey(Display *display, int keycode, unsigned int
modifiers, Window grab_window, Bool owner_events, int pointer_mode, int keyboard_mode);
int XUngrabKey(Display *display, int keycode, unsigned int
modifiers, Window grab_window);

Maybe it is time to add cross method in u++?

[Updated on: Fri, 18 September 2009 08:10]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Segfaults with One container?
Next Topic: Add maximize and reduce to icon
Goto Forum:
  


Current Time: Wed Jul 16 15:20:22 CEST 2025

Total time taken to generate the page: 0.03434 seconds