two keybindings were using keys without modifiers, adjusted these to use the ctrl key.
Furthermore when typing in moves we need to check if ctrl was pressed and ignore those inputs.
Also added documentation for these keybindings.
"\
:<Key>F1: ManProc() \n \
:<Key>F2: FlipViewProc() \n \
- <KeyDown>.: BackwardProc() \n \
- <KeyUp>.: ForwardProc() \n \
- Shift<Key>1: AskQuestionProc(\"Direct command\",\
+ :Ctrl<KeyDown>.: BackwardProc() \n \
+ :Ctrl<KeyUp>.: ForwardProc() \n \
+ :Ctrl<Key>1: AskQuestionProc(\"Direct command\",\
\"Send to chess program:\",,1) \n \
- Shift<Key>2: AskQuestionProc(\"Direct command\",\
+ :Ctrl<Key>2: AskQuestionProc(\"Direct command\",\
\"Send to second chess program:\",,2) \n";
char boardTranslations[] =
@cindex Keys
@cindex Shortcut keys
@table @asis
+@item Show last move
+By hitting @kbd{Ctrl+.} the last move will be re-animated.
+@item Send a command directly to the chess engine
+Using @kbd{Ctrl+1} a popup window will prompt you for a command that
+will be send directly to the first chess engines. @kbd{Ctrl+2} does the
+same for a second chess engine, if present.
@item Load Next Game
@cindex Load Next Game, Menu Item
Loads the next game from the last game record file you loaded.
{
char buf[10], keys[32];
KeySym sym;
- KeyCode metaL, metaR;
+ KeyCode metaL, metaR, ctrlL, ctrlR;
int n = XLookupString(&(event->xkey), buf, 10, &sym, NULL);
XQueryKeymap(xDisplay,keys);
metaL = XKeysymToKeycode(xDisplay, XK_Meta_L);
metaR = XKeysymToKeycode(xDisplay, XK_Meta_R);
- if ( n == 1 && *buf >= 32 && !(keys[metaL>>3]&1<<(metaL&7)) && !(keys[metaR>>3]&1<<(metaR&7))) { // printable, no alt
+ ctrlL = XKeysymToKeycode(xDisplay, XK_Control_L);
+ ctrlR = XKeysymToKeycode(xDisplay, XK_Control_R);
+ if ( n == 1 && *buf >= 32 // printable
+ && !(keys[metaL>>3]&1<<(metaL&7)) && !(keys[metaR>>3]&1<<(metaR&7)) // no alt key pressed
+ && !(keys[ctrlL>>3]&1<<(ctrlL&7)) && !(keys[ctrlR>>3]&1<<(ctrlR&7)) // no ctrl key pressed
+ )
+ {
if(appData.icsActive) { // text typed to board in ICS mode: divert to ICS input box
if(shells[4]) { // box already exists: append to current contents
char *p, newText[MSG_SIZ];