Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!unmvax!gatech!udel!mmdf From: AXTBF%ALASKA.BITNET@cunyvm.cuny.edu (Tim Friest - programmer at large) Newsgroups: comp.sys.amiga Subject: KeyMap problems Message-ID: <7867@louie.udel.EDU> Date: 2 Feb 89 23:24:51 GMT Sender: mmdf@udel.EDU Lines: 53 I have been writing a Key Map Editor program and have had a problem with guru visits saying corrupted memory list or memory trap. I suspected that the problem was with the actual keymap files so I added a check to display the values for the undefined or reserved keycodes. Though the memory addresses are meaningless on their own, I printed them out because they should be close to eachother since a keymap is a single hunk which is loadseged into memory. Anyway, here is the output I got for USA1 from the AmigaDOS 1.3 enhancer release >KeyCode 78 should be undefined but is an illegal type >KeyCode 79 should be undefined but is an illegal type >KeyCode 7a should be undefined but is an illegal type >KeyCode 7b should be undefined but is an illegal type >KeyCode 7c should be undefined but is KCF_DEAD at address 670047 >KeyCode 7d should be undefined but is an illegal type >KeyCode 7e should be undefined but is KCF_DEAD at address 70007 >KeyCode 7f should be undefined but is KCF_DEAD at address 870087 The types are from KeyMap->KeyMapType[KeyCode] & (KCF_STRING|KCF_DEAD|KCF_NOP) My question: Aren't the undefined keycodes supposed to be KCF_NOP?? They are everywhere except 78-7F.... If these values really aren't undefined, then why are they KCF_DEAD (cdn had a KCF_STRING on keycode 7b) which point to bogus memory locations? Using a normal keymapping, 7c would map to roughly alone (G), shift (NULL), alt (g), and shift+alt (NULL) which doesn't make any sense either... By the way, I hope to be posting this editor to the Net soon (it will be shareware or freeware or maybe even PD), but I need to iron out the bugs. The plug: If you are developing any software which uses a default keyboard layout and you are not using keymaps, PLEASE do it right and use the keymaps. Honestly they are easier then typing in the matrix of values. Even if you're not using default keymaps, you might consider creating one and loading it in with a loadseg (really, that's all you do): bptr = LoadSeg("devs:keymaps/usa1"); KeyMapNode = (struct KeyMapNode *)BADDR((bptr+1)); In my opinion, keymaps are one of the features that make the Amiga great... I can use a dvorak keyboard if I want, or a french, german, british, etc. Don't force me to use usa1 or usa0 unless I want to. p.s. What does KCF_DOWNUP mean? send replies to: AXTBF@ALASKA.BITNET Disclaimer: My employer has been disclaiming me for years. They certainly don't have any responsibility for what I do on my free time. All opinions expressed are my own (and they should be yours too).