summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authordas <das>2006-07-21 06:26:28 (GMT)
committerdas <das>2006-07-21 06:26:28 (GMT)
commitc830c76db3f8d9b0d270072bd6b39999267a104c (patch)
treef43e7b7126e3ec0ce3d18faa93fc7cf86a227b97 /generic
parentfb44c00e54f9fd7f838c5339d3b07579e119206a (diff)
downloadtk-c830c76db3f8d9b0d270072bd6b39999267a104c.zip
tk-c830c76db3f8d9b0d270072bd6b39999267a104c.tar.gz
tk-c830c76db3f8d9b0d270072bd6b39999267a104c.tar.bz2
* generic/tkBind.c (TkBindInit): for REDO_KEYSYM_LOOKUP, change
keysym-to-string mapping hash to use first name in ks_names.h instead of last (if there are multiple possibilities), e.g. "F11" instead of "L1". * macosx/tkMacOSXKeyboard.c (TkpGetKeySym): correct keysyms for pure modifier key presses [Bugs 700311, 1525905]; correct keysym for Enter key; add keysyms for new NumLock and Fn modifiers (added 2005-08-09).
Diffstat (limited to 'generic')
-rw-r--r--generic/tkBind.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/generic/tkBind.c b/generic/tkBind.c
index 1fa637e..1ee4e7d 100644
--- a/generic/tkBind.c
+++ b/generic/tkBind.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution of
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tkBind.c,v 1.40 2006/05/25 23:49:32 hobbs Exp $
+ * RCS: @(#) $Id: tkBind.c,v 1.41 2006/07/21 06:26:28 das Exp $
*/
#include "tkPort.h"
@@ -741,7 +741,7 @@ TkBindInit(
Tcl_HashEntry *hPtr;
ModInfo *modPtr;
EventInfo *eiPtr;
- int dummy;
+ int newEntry;
#ifdef REDO_KEYSYM_LOOKUP
KeySymInfo *kPtr;
@@ -749,23 +749,25 @@ TkBindInit(
Tcl_InitHashTable(&keySymTable, TCL_STRING_KEYS);
Tcl_InitHashTable(&nameTable, TCL_ONE_WORD_KEYS);
for (kPtr = keyArray; kPtr->name != NULL; kPtr++) {
- hPtr = Tcl_CreateHashEntry(&keySymTable, kPtr->name, &dummy);
+ hPtr = Tcl_CreateHashEntry(&keySymTable, kPtr->name, &newEntry);
Tcl_SetHashValue(hPtr, kPtr->value);
hPtr = Tcl_CreateHashEntry(&nameTable, (char *) kPtr->value,
- &dummy);
- Tcl_SetHashValue(hPtr, kPtr->name);
+ &newEntry);
+ if (newEntry) {
+ Tcl_SetHashValue(hPtr, kPtr->name);
+ }
}
#endif /* REDO_KEYSYM_LOOKUP */
Tcl_InitHashTable(&modTable, TCL_STRING_KEYS);
for (modPtr = modArray; modPtr->name != NULL; modPtr++) {
- hPtr = Tcl_CreateHashEntry(&modTable, modPtr->name, &dummy);
+ hPtr = Tcl_CreateHashEntry(&modTable, modPtr->name, &newEntry);
Tcl_SetHashValue(hPtr, modPtr);
}
Tcl_InitHashTable(&eventTable, TCL_STRING_KEYS);
for (eiPtr = eventArray; eiPtr->name != NULL; eiPtr++) {
- hPtr = Tcl_CreateHashEntry(&eventTable, eiPtr->name, &dummy);
+ hPtr = Tcl_CreateHashEntry(&eventTable, eiPtr->name, &newEntry);
Tcl_SetHashValue(hPtr, eiPtr);
}
initialized = 1;