Linux - SoftwareThis 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
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.