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 » Developing U++ » UppHub » New functions to SysInfo
Re: New functions to SysInfo [message #21222 is a reply to message #21212] Sun, 10 May 2009 09:23 Go to previous messageGo to previous message
Mindtraveller is currently offline  Mindtraveller
Messages: 917
Registered: August 2007
Location: Russia, Moscow rgn.
Experienced Contributor

tojocky wrote on Sun, 10 May 2009 00:01

I want to handle the shortcut key when the GoogleTranslator is running (is in tray or opened main window).
Testing keyboard with timeout is good, but there are two drawbacks:
- Pushing keyboard could possibly fit into "sleep" period
- If you make this sleep period too short (less than 200 msec) this will possibly degrade overall system performance, especially on older machines.

There is a way to check these keys in a less brute way. It is called keyboard hook. On short, you request operating system to install key sequence and message. When user presses these key sequence in ANY application, OS automatically sends hook-installed message to you main window.

That`s the way it`s done in Windows:
http://www.codeguru.com/cpp/w-p/system/keyboard/article.php/ c5699

I don`t know really know if there is a common solution for setting hooks in POSIX systems this way easy. But what I found is the xbindkeys application:
http://hocwp.free.fr/xbindkeys/xbindkeys.html
I don`t know if it works properly and exist between many *nix window managers (I do personally use xfce and fluxbox). Hope this helps.
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message icon14.gif
Read Message
Read Message
Read Message
Previous Topic: How to get/set keyboard layout in u++
Next Topic: TabBar translation file
Goto Forum:
  


Current Time: Tue May 14 16:03:51 CEST 2024

Total time taken to generate the page: 0.02726 seconds