GTK+ Forums

Discussion forum for GTK+ and Programming. Ask questions, troubleshoot problems, view and post example code, or express your opinions.
It is currently Thu Oct 23, 2014 5:53 pm

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: How set or reset num lock, scroll lock or caps lock?
PostPosted: Thu Sep 08, 2011 6:32 am 
Offline
GTK+ Geek

Joined: Wed Mar 18, 2009 2:26 pm
Posts: 62
Hello All

Is there any way in GTK to set and reset any one of the Num lock, scroll Lock or Caps Lock key programmatically?

Thanks in advance.

_________________
Hello, העלו, Здравствулте!


Top
 Profile  
 
 Post subject: Re: How set or reset num lock, scroll lock or caps lock?
PostPosted: Thu Sep 08, 2011 6:54 am 
Offline
Never Seen the Sunlight

Joined: Mon Apr 28, 2008 5:52 am
Posts: 764
Location: UK
Hi,

As far as I know there is no way within the GTK+/GDK/GLIB libraries that have a way of setting the state of the num lock, scroll lock or caps lock keys. There are ways to read there state, but that is all that I could find.

Why do you need this feature? as it would then be interfering with the users interface and be confusing when switching between applications.

Errol.

_________________
E.


Top
 Profile  
 
 Post subject: Re: How set or reset num lock, scroll lock or caps lock?
PostPosted: Fri Jan 27, 2012 4:21 am 
Offline
GTK+ Geek

Joined: Wed Mar 18, 2009 2:26 pm
Posts: 62
I found a way to turn the numlock On and OFF using "numlockx" from the command line and running it through system().
As this is a dedicated Touch Screen Machine, there would be only one application running for the user and the user would interact through it.
There is another called "setleds" which can control all 3 Leds, but that works in a non-graphical environment.

_________________
Hello, העלו, Здравствулте!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group