Xev can't detect Caps_lock


 
Thread Tools Search this Thread
Special Forums UNIX Desktop Questions & Answers Xev can't detect Caps_lock
# 1  
Old 11-26-2012
Xev can't detect Caps_lock

Hi:

I am trying to remap Caps_lock to something else but just encountered an unexpected issue: the xwindows can't even detect Caps_lock. I tried with xev, there was no events shown when Caps_lock key was toggled.

the key itself still works though, meaning it does toggle the uppercase/lowercase mode (except when being used in xev).

is xev suppoped to detect Caps_lock (or Num_lock)? if it is, what could cause it to ignore them?

BTW, there is no ".xmodmap" in my home directory yet. Also, I am using Vnc if it matters.

Thanks.
# 2  
Old 11-30-2012
It may be that it is held internal to the keyboard driver, and ditto for num lock. I have a laptop and a usb numeric keyboard, but because it is not the right model, when I num lock, the numeric alternatives on the main keyboard kick in as well as the usb keys, so I have to keep toggling num lock or remap all the keys in reverse.

What all is between your keyboard and your x server?
# 3  
Old 02-05-2013
Try with `xmodmap -e`
Here an example of my .xinitrc:
xmodmap -e "remove Lock = Caps_Lock" # Remove Caps Lock
xmodmap -e "keycode 66 = BackSpace" # Make the key into Backspace

the key codes are located in <X11/keysymdef.h> without the XK_ prefix

Also sometimes the window manager catch the key before any other programs so try with another wm.

Last edited by venam; 02-05-2013 at 06:22 AM.. Reason: Sorry
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Detect OS

whats the equivalent of detect OS in perl with an if then ? platform='uname' if ]; then alias ls='ls --color=auto' elif ]; then alias ls='ls -G' fi In perl I see perl -Mstrict -MEnglish -E 'say $OSNAME' or print "$^O" Please use CODE tags as required by... (1 Reply)
Discussion started by: nixguynj
1 Replies

2. Shell Programming and Scripting

Detect changes to crontab

Dear All, My server is running crontabs of 4 different users. I want to develop a script that whenever a particular change occurs in a crontab , it is detected and the particular change is noted into a file. Kindly let me know of suggestions on how it can be achieved. My algo would be: ... (1 Reply)
Discussion started by: Junaid Subhani
1 Replies

3. Red Hat

Detect the lun

Hi, Is there command to detect the newly added LUN is linux box. I tried with below commands, but that doesn't work out. fdisk -l, fdisk -l | grep Disk pvscan (5 Replies)
Discussion started by: gsiva
5 Replies

4. Shell Programming and Scripting

detect F5 is pressed

Hello friends, I want to write a shell script in bash shell . Working for the script is to detect any key pressed and disply on screen as "you have pressed: " For example if user pressed F5 then a messaged has to be displayed as "you have pressed F5. Thank you. (4 Replies)
Discussion started by: pradeepreddy
4 Replies

5. Shell Programming and Scripting

Detect changes in a file

Hi all Just curious , is it possible to detect changes in a file and sent to email . For ex: demo.conf I would like to receive an email everytime a particular file(demo.conf) changes and the content added/removed and who did the change (userid). Is it possible. Thanks CK (4 Replies)
Discussion started by: coolkid
4 Replies

6. UNIX for Advanced & Expert Users

How to detect OS is SLES 10 or not

Hi, I would like to programmatically find if given OS is SLES 10 / RHEL 3/.RHEL 4/RHEL5 etc .. For this do we have any library call/sys call? Or should we use any sys. structure which would give me detailed info. Share me if you have any pointers. Thanks in advance - Krishna (1 Reply)
Discussion started by: krishnamurthig
1 Replies

7. Shell Programming and Scripting

How to detect whethere the CD is R or RW

Hi all, I need to write a script to write data into cd. Am using cdrecord command. i need to implement the following if ( CD-RW) ( ?? How to find this ) cdrecord blank option else cdrecord with out blank option Now can you please help me to form this statement... (2 Replies)
Discussion started by: jisha
2 Replies

8. Shell Programming and Scripting

xterm detect

i have this script that launches multiple xterm sessionon a CDE. i would like to test the xterm so that when i execute the script using an ordinary terminal it will detect that it will unable to launch the xterm and execute other script instead. i tried using trap and exit status. maybe i am... (2 Replies)
Discussion started by: inquirer
2 Replies

9. Shell Programming and Scripting

How to detect process

Dear Sir, Now I use oracle database on AIX server and found some user use iligal program such as development tool logon to my database. I want to detect the process of illegal program and kill it. Could you please suggest me to make detect process. Thank you very much Pkanonwe. (2 Replies)
Discussion started by: pkanonwe
2 Replies

10. Programming

compile xev on HPUX 10.20 - errors

Hello, i compiled the program xev under HPUX 10.20 and there are a lot of errors like this. Can anybody help me to fix this errors? make xev cc -O xev.c -o xev /usr/ccs/bin/ld: Unsatisfied symbols: XFree (code) XKeysymToString (code) XSelectInput (code) XOpenDisplay... (1 Reply)
Discussion started by: lan
1 Replies
Login or Register to Ask a Question