LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices



Reply
 
Search this Thread
Old 09-04-2009, 06:30 AM   #1
sreeharsha.t
Member
 
Registered: Jan 2009
Location: Mumbai, India
Distribution: Fedora 9, 10,11, RHEL 5
Posts: 67

Rep: Reputation: 18
Question Disabling Key combinations in X


Hi,

I am developing an assessment software which has to work on linux. It has to disable certain key combinations which the user may use to shift to other applications when the assessment software is running essentially to prevent the user from copying from other programs.

For eg: While giving an assessment, the user should not be allowed to switch to other programs by pressing Alt+Tab or into terminal by pressing Ctrl+Alt+F<1-5>.

I am exploring loadkeys and xmodkeys for this and I am yet not sure whether they can address this requirement fully. Am I referring to the correct tools or is there any other way through which this can be accomplished?

Thanks,
Harsha
 
Old 09-04-2009, 10:28 AM   #2
estabroo
Senior Member
 
Registered: Jun 2008
Distribution: debian, ubuntu, sidux
Posts: 1,095
Blog Entries: 2

Rep: Reputation: 111Reputation: 111
the ctrl-alt-f<1-5> can be turned off in the x config file add the DontVTSwitch option to the server layout section. The alt-tab behavior is being controlled by the window manager so you probably have to shut it off in there.

other xconfig options you might want on are DontZap and DontZoom
 
Old 09-08-2009, 12:19 AM   #3
sreeharsha.t
Member
 
Registered: Jan 2009
Location: Mumbai, India
Distribution: Fedora 9, 10,11, RHEL 5
Posts: 67

Original Poster
Rep: Reputation: 18
Thanks Estabroo,

Though your options seemed viable, they are unsuitable for my application as it permanently disables the keys. Our application needs a temporary disablement of certain keys and when the application quits, all those keys should be re-enabled.

I am now content with the functionality of xmodmap. By using that I am able to disable and re-enable the key board keys. I wrote a script which will launch the application after disabling the keys and enables them after the program quits.

Regards,
Harsha
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating new compose and dead-key combinations DavidMcCann Linux - General 3 10-13-2007 06:01 AM
Binding Thinkpad Keys to Key Combinations CaffeineJunkie Linux - Desktop 0 10-03-2006 11:27 AM
Alt key combinations not working in mc, Slackware 10.2 jcdrywater Slackware 3 11-21-2005 06:28 AM
Key combinations that will stop a boot? txtedmacs Linux - General 11 08-22-2005 08:03 PM
key combinations to launch apps? will103 Linux - Software 2 09-11-2004 03:55 PM


All times are GMT -5. The time now is 07:37 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration