Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Software
User Name
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.


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

Rep: Reputation: 18
Question Disabling Key combinations in X


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?

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

Rep: Reputation: 124Reputation: 124
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-07-2009, 11:19 PM   #3
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.



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 05:01 AM
Binding Thinkpad Keys to Key Combinations CaffeineJunkie Linux - Desktop 0 10-03-2006 10:27 AM
Alt key combinations not working in mc, Slackware 10.2 jcdrywater Slackware 3 11-21-2005 05:28 AM
Key combinations that will stop a boot? txtedmacs Linux - General 11 08-22-2005 07:03 PM
key combinations to launch apps? will103 Linux - Software 2 09-11-2004 02:55 PM > Forums > Linux Forums > Linux - Software

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

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