mirror of
https://github.com/keymanapp/keyman.git
synced 2026-09-25 09:07:40 +00:00
Fix problem with deadkeys not being added to history; send debug messages to stderr
This commit is contained in:
parent
16843c6c9a
commit
5be9cb177b
2 changed files with 18 additions and 14 deletions
|
|
@ -424,23 +424,27 @@ int process_rule(KMSI *p_kmsi, XRULE *rp, ITEM *any_index, int usekeys)
|
|||
// Then output the output string (excepting deadkeys), and add it to the history
|
||||
for(n=0, p=output; n<nout; n++, p++)
|
||||
{
|
||||
if(ITEM_TYPE(*p) != ITEM_DEADKEY)
|
||||
if(ITEM_TYPE(*p) == ITEM_DEADKEY)
|
||||
{
|
||||
if (ITEM_TYPE(*p) == ITEM_KEYSYM)
|
||||
{
|
||||
add_to_history(p_kmsi,*p);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (ITEM_TYPE(*p) == ITEM_KEYSYM)
|
||||
{
|
||||
unsigned int key, state;
|
||||
key = (*p) & 0xFFFF;
|
||||
state = ((*p) >> 16) & 0xFF;
|
||||
DBGMSG(1, "DAR - libkmfl - ITEM_KEYSYM key:%x, state: %x\n", key, state);
|
||||
forward_keyevent(p_kmsi->connection, key, state);
|
||||
clear_history(p_kmsi);
|
||||
}
|
||||
else
|
||||
{
|
||||
output_item(p_kmsi->connection,*p);
|
||||
add_to_history(p_kmsi,*p);
|
||||
}
|
||||
}
|
||||
forward_keyevent(p_kmsi->connection, key, state);
|
||||
clear_history(p_kmsi);
|
||||
}
|
||||
else
|
||||
{
|
||||
output_item(p_kmsi->connection,*p);
|
||||
add_to_history(p_kmsi,*p);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Reset pointer and continue
|
||||
|
|
|
|||
|
|
@ -20,8 +20,8 @@ void DBGMSG(int debug,char *fmt,...)
|
|||
|
||||
if((debug<0) || ((kmfl_debug&debug)!=0))
|
||||
{
|
||||
debugfile=fopen("/tmp/libkmfldebug.log", "a");
|
||||
// debugfile=stderr;
|
||||
// debugfile=fopen("/tmp/libkmfldebug.log", "a");
|
||||
debugfile=stderr;
|
||||
fprintf(debugfile,"debug: ");
|
||||
va_start(args,fmt);
|
||||
vfprintf(debugfile,fmt,args);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue