🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.amiga.tech
Article #10121

Re: Opposite of Deadkeyconvert() ?

#10121
From: Matt Dillon
Date: Wed, 26 Oct 1988 02:45
22 lines
1421 bytes
:Is there a CBM-blessed method for taking an ASCII character and determining
:the rawkey scancode(s) that are necessary to generate it? Note this is
:the _opposite_ of deadkeyconvert(). Ideally it should handle the entire
:printable ASCII set, including those requiring a deadkey first, and
:allowed combinations of qualifiers.
:
:John

	Look at KEYBOARD.C in the DME source just posted by the moderator
to comp.sources.amiga ... DME does this kind of reverse engineering when
it starts up so it can convert key specifications to raw codes for the
MAP command.

	Essentially you just declare an InputEvent structure and stuff it,
in turn, with all the keycodes, then send it through RawKeyConvert() to see
what ascii, if any, turns up.  There are some special cases, like multiple
codes mapping to the same ascii char, but all in all it's relatively painless.

	The other way to do it, especially if you want to be fancy and
figure out multiple-key sequences, it to obtain the keymap and scan that.

					-Matt
Technical Details
Message-ID: <8810260245.AA01372@cory.Berkeley.EDU>
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!apple!bionet!agate!ucbvax!CORY.BERKELEY.EDU!dillon

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!rutgers!apple!bionet!agate!ucbvax!CORY.BERKELEY.EDU!dillon
From: dillon@CORY.BERKELEY.EDU (Matt Dillon)
Newsgroups: comp.sys.amiga.tech
Subject: Re: Opposite of Deadkeyconvert() ?
Message-ID: <8810260245.AA01372@cory.Berkeley.EDU>
Date: 26 Oct 88 02:45:16 GMT
Sender: daemon@ucbvax.BERKELEY.EDU
Lines: 22