How to disable Ctrl and Alt keys? (and maybe sysrq)
SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
How to disable Ctrl and Alt keys? (and maybe sysrq)
I'm working with slackware, and trying to disable Ctrl and Alt keys. I am _not_ using X. The application I'm building is a prototype electronic voting machine. (yes, we have a paper trail! every state of the voting pannel is printed out in a hex-barcode on a grocery-style printer) We need to elminate most functionality of the keyboard while voting is in progress. I was wondering which way would be ideal (scancode or keymaps) and I'm pritty new with linux, having only about 5 months of experience. I'm fairly computer-able though, and a second year computer science major now. Any help or advice would be great, thanks for help!
Last edited by bigperk420; 11-04-2004 at 07:05 PM.
wow, quick to the punch, I realized the second I posted that I didn't state "not in X" just in normal console or whatever the cmd line version is. (normal for me, since I have started using linux, I havn't used the gui nearly ever)
So I went looking for that /etc/rc.d/rc.keymap file which should load the keymap (right?) and all thats in the directory is: rc.0 rc.6 rc.M rc.acpid rc.local rc.serial rc.sysvinit rc.4 rc.K rc.S rc.hotplug rc.modules rc.syslog rc.udev
I'm using version 2.4.26 (gcc version 3.3.4) and I stripped down the size of the install as much as possible (it's < 60megs now) because we're using compact flash plugged into the IDE channel as a HD and a VIA-EPIA mobo (eden processor) which means it has (count em!) zero moving parts which is nifty... but I realize it isn't a great developing machine because so many utils are stripped out. I will reinstall (more fully) on a second machine tomorrow and see if I can use the previous advice to create the file I need and import it to the mini-install ... thanks for the quick help!
Last edited by bigperk420; 11-04-2004 at 07:26 PM.
Doubtful on the kbd package. Do I need it? (clearly hehe) anyways, I stripped down the install: as many questions going through the step by step newb install script as I could I answered no to. If I need that ok, but, how is my keyboard mapped even if I didn't load that? I mean I don't even have the loadkeys util (so where is the keyboard map coming from?)
update: I made a full install of slackware 10.0 with only the X and gnome stuff out... I installed the kbd package, and verified it was installed with pkgtool but I still don't have this rc.keymap file. Should I create it from your example? Shouldn't I just be able to edit the qwerty default keymapfile?
hehe, good call, but: I was really trying to accually disable ctrl and alt keys themselves (which would have the effect of making the "three finger salute" un-doable but also disalow a slew of other meta cmds. . . Ctrl-C comes to mind and Alt-codes that would allow people messing around to screw stuff up. (input some of the symbols we are using for barcode-scanner which we need to be 'uncreatable' via the keyboard) so thanks, but no cigar, your leap of logic was slightly off, but makes perfect sense, thanx
I have solved this problem to my satisfaction. I used the following advice to edit the keymap I want. I added a little shell script to my /etc/rc.d/rc.local file (last script to be run before login) that asks me which loadkeys file to load. This is how you edit that loadkey-file:
To modify the Control and Alt keys you can do the following:
At the root prompt:
(you must be root to do this)
# dumpkeys > keylist.txt
# vi keylist.txt
find the line that says "keycode 29 = Control" and edit it by pressing 'i'
you can change this to a number of values but leaving it blank will disable it.
do the same thing for:
keycode 56 and keycode 97 (or whatever keys you want to disable)
Well congratulations on that... glad to see you worked it out. Thanks for making sure to put it here, too many people *don't* do that, so even if someone with the same questions does search, it doesn't do them any good.