I do a lot of shell scripting in linux (running xmonad window manager, so I can use xmodmap or xinput, but not GNOME or KDE control panels), and it would be super useful for a shift-space keystroke to output an underscore ("_") character. Any ideas how to do this?
What i have:
- Linux machine (debian stable) without monitor, keyboard, no X running
- USB-device which acts like an USB-keyboard (like many barcode-readers [1])
What i (don't) want:
- I want to use this device only for one specific application.
- I don't want to have this device interfere with e.g. the
login
process after booting or anything else - except the one application. - In any way, i want to be able to plug in a plain old USB keyboard an use it as such - independent of how many other USB-devices like mentioned above may be connected or not.
What i (don't) know:
- I found some example codes, about how to read directly from the event devices and can use this in my application, if needed.
- I don't know, how to disable a specific keyboard for the whole system except this specific application? Is this even possible?
Thanks for any hints ... !
[1] When the device reads a barcode, it's sends the detected code as single key presses and commits with return.
In a situation where an admin will enter sensitive information into a keyboard (the root password), what is the risk that a bluetooth keyboard (ship by default with Mac systems these days) would put those passwords at risk?
Another way of asking would be: what security and encryption protocols are used, if any, to establish a bluetooth connection between a keyboard and host system?
Edit: Final Summary
All answers are excellent. I accepted that which links to the most directly applicable information however I also encourage you to read Nathan Adams's response and discussion about security trade-offs.
In the mysql
command line, pressing Control-C will cancel the programme, and bring you back to bash. In psql
, the one for postgres, it will kill the current query and will not stop the psql programme. Is there any way to get the psql style behaviour for Control-C in the mysql programme? I keep finding myself pressing Control-C by habit and having to log back into mysql.
Control C doesn't kill bash, and log you out when you press it. Which I think is a good thing. Control-C means 'stop what you're doing'.
I used to have the caps lock and control swapped in GNOME, but when I upgraded to Ubuntu 9.04 I also changed my desktop environment to Xfce. I have the following line in my xorg.conf:
Option "XkbOptions" "ctrl:nocaps"
But that doesn't seem to make a difference to Xfce. Any ideas?