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.

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?

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.