options.network = FALSE;
options.verbose = FALSE;
options.debug = FALSE;
- options.debug_x11_sync = FALSE;
#if 1
options.verbose = TRUE;
{
options.debug = TRUE;
}
- else if (strncmp(option, "-debug-x11-sync", option_len) == 0)
- {
- options.debug_x11_sync = TRUE;
- }
else if (strncmp(option, "-verbose", option_len) == 0)
{
options.verbose = TRUE;
{ KSYM_braceright, "XK_braceright", "brace right" },
{ KSYM_asciitilde, "XK_asciitilde", "~" },
- /* special (non-ASCII) keys (ISO-Latin-1) */
+ /* special (non-ASCII) keys */
{ KSYM_degree, "XK_degree", "degree" },
{ KSYM_Adiaeresis, "XK_Adiaeresis", "A umlaut" },
{ KSYM_Odiaeresis, "XK_Odiaeresis", "O umlaut" },
char getCharFromKey(Key key)
{
+ static struct
+ {
+ Key key;
+ byte key_char;
+ } translate_key_char[] =
+ {
+ /* special (non-ASCII) keys (ISO-8859-1) */
+ { KSYM_degree, CHAR_BYTE_DEGREE },
+ { KSYM_Adiaeresis, CHAR_BYTE_UMLAUT_A },
+ { KSYM_Odiaeresis, CHAR_BYTE_UMLAUT_O },
+ { KSYM_Udiaeresis, CHAR_BYTE_UMLAUT_U },
+ { KSYM_adiaeresis, CHAR_BYTE_UMLAUT_a },
+ { KSYM_odiaeresis, CHAR_BYTE_UMLAUT_o },
+ { KSYM_udiaeresis, CHAR_BYTE_UMLAUT_u },
+ { KSYM_ssharp, CHAR_BYTE_SHARP_S },
+
+ /* end-of-array identifier */
+ { 0, 0 }
+ };
+
char *keyname = getKeyNameFromKey(key);
char c = 0;
c = keyname[0];
else if (strEqual(keyname, "space"))
c = ' ';
+ else
+ {
+ int i = 0;
+
+ do
+ {
+ if (key == translate_key_char[i].key)
+ {
+ c = translate_key_char[i].key_char;
+
+ break;
+ }
+ }
+ while (translate_key_char[++i].key_char);
+ }
return c;
}