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 #21251 is a reply to message #21222] Sun, 10 May 2009 22:08 Go to previous messageGo to previous message
koldo is currently offline  koldo
Messages: 3372
Registered: August 2008
Senior Veteran
Hello Mindtraveller

I am almost agree with you but I would like to clarify a little bit:

- In windows

Installing a keyboard hook is a good solution as there is no possibility to lose a key. The reason is because the OS will call your function every time an user press a key


- In Posix

xbindkeys seems to be the solution. But it does not do miracles. The core of the program is in an infinite loop beginning with:
  	while (True) {
   		while(!XPending(d)) {
   			...
	  		usleep(SLEEP_TIME*1000);
		}
...


where SLEEP_TIME is 100, so it checks every tenth of second if something has happened.

Install a keyboard listener is never cheap, but it is useful so at least they have to do things reliabily and fast.


Best regards
Koldo



Best regards
IƱaki
 
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: Sat Jun 08 18:31:44 CEST 2024

Total time taken to generate the page: 0.01998 seconds