We have a program that uses F1 to F6 keys to change screen. All works like it should and always did. We noticed that these F# keys in combination with CTRL is being used by the windows manager and disrupts our program and needs to be disabled. To achieve this I used Xmodmap to disable CTRL-F1 to CTRL-F12. This all works well but when I connect a vnc client then the F# keys appear to be mapped all wrong depending on the order I pressed them first! For example if I press them once all in the right order like from F1 to F12 then they will always be ok but if I first press F6 then they are all mixed up after that meaning that pressing F5 could be mapped to F3 and F2 could be mapped to F4 and so on,
This is the content of my .Xmodmap
clear control
add control = Control_L Control_R
!Disable CTRL-F1 ... CTRL-F12
keycode 67 control=
keycode 68 control=
keycode 69 control=
keycode 70 control=
keycode 71 control=
keycode 72 control=
keycode 73 control=
keycode 74 control=
keycode 75 control=
keycode 76 control=
keycode 95 control=
keycode 96 control=