The XVnc server (at least the version I just tried, which is not current)
does not define a Num_Lock key initially.
You can do this, however:
xmodmap -e 'keycode 128 = Num_Lock'
xmodmap -e 'add mod3 = Num_Lock"
This works because of the way VNC handles keys. Essentially (if I understand
correctly), VNC sends key symbols (like Num_Lock) between the client and the
server. If the Xvnc server already has a mapping for that keysym (either in
its default map or the dynamic map), it will use it; if not, it will use the
next free keycode to create a dynamic mapping.
In fact, the 'xmodmap' would work if you pressed Num_Lock first, because
that would also create a dynamic mapping.
*Do not* do the first statement (keycode =) for a normal server; you'll
screw up your keyboard.
According to Jeff Boerio:
> Does anyone have a solution for issues where xmodmap doesn't work properly?
>
> One set of customers is complaining that the xmodmap command has no effect
> on the X server's settings:
>
> plxw0032 204 /fs3/e/boerio> xmodmap
> xmodmap: up to 2 keys per modifier, (keycodes in parentheses):
>
> shift Shift_L (0xa), Shift_R (0xb)
> lock
> control Control_L (0x8), Control_R (0x9)
> mod1 Alt_L (0xe), Alt_R (0xf)
> mod2
> mod3
> mod4 Meta_L (0xc), Meta_R (0xd)
> mod5
> plxw0032 205 /fs3/e/boerio> xmodmap -e "add mod3 = Num_Lock"
> plxw0032 206 /fs3/e/boerio> echo $status
> 1
> plxw0032 207 /fs3/e/boerio> xmodmap
> xmodmap: up to 2 keys per modifier, (keycodes in parentheses):
>
> shift Shift_L (0xa), Shift_R (0xb)
> lock
> control Control_L (0x8), Control_R (0x9)
> mod1 Alt_L (0xe), Alt_R (0xf)
> mod2
> mod3
> mod4 Meta_L (0xc), Meta_R (0xd)
> mod5
>
> plxw0032 208 /fs3/e/boerio> echo $status
> 0
>
> So, the xmodmap is returning some sort of error code, which isn't
> documented in the man page.
>
> When running the same commands from a console X session, or through
> something like Exceed, this command doesn't fail.
>
> Thanks,
>
> - Jeff
> ---------------------------------------------------------------------
> To unsubscribe, send a message with the line: unsubscribe vnc-list
> to [EMAIL PROTECTED]
> See also: http://www.uk.research.att.com/vnc/intouch.html
> ---------------------------------------------------------------------
--
Grant McDorman <[EMAIL PROTECTED]>, Sr. Software Design Consultant
Cedara Software Corp. <URL:http://www.cedara.com>
(formerly I.S.G. Technologies Inc.)
Mississauga, Ontario, Canada
[demime 0.97b removed an attachment of type application/pgp-signature]
---------------------------------------------------------------------
To unsubscribe, send a message with the line: unsubscribe vnc-list
to [EMAIL PROTECTED]
See also: http://www.uk.research.att.com/vnc/intouch.html
---------------------------------------------------------------------