User panel stuff on forum
  2 posts on 1 page  1
Client Talk
2007-03-13, 11:46
Member
1011 posts

Registered:
Feb 2006
Is it just me or do none of these currently work under Linux? e.g., ctrl+p is not picked up

if (unichar == 'P' - '@')
goto on_ctrl_p;

surely you need

if (keydown[K_CTRL] && unichar == 'p')
goto on_ctrl_p;

(which works)

i've not actually looked at wchar etc. yet though to understand why you are doing the - '@', obviously it is part of the new wide character support ...
2007-03-16, 07:11
Member
364 posts

Registered:
Oct 2006
Windows generates unicode symbols in 1..26 range when you press ctrl-a..ctrl-z, that's why this works in Windows. The reason I prefer this way is because it follows layout changes: e.g. when I press Ctrl-P in Dvorak layout, I want the engine to recognize it as Ctrl-P and not as Ctrl-R (Dvorak P is on the same key as QWERTY R).
Now in Linux this doesn't work; I was going to fix it one day but you can do it, too The idea is to mimic Windows and convert unichars to 1..31 range whenever ctrl+alphabetic is pressed.
  2 posts on 1 page  1