NotaBene Mailing List 2002

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

re: key scan codes



On my Win XP installation of NB6.1 the xpl program worked fine--except that I couldn't get out of it. I had to reboot the computer to clear it--just closing and reopening NB did not seem to be able to clear the program.

The scancodes it give are 5 (I think--or maybe 6 ?--I don't feel like rechecking at the moment!) digit numbers, including the one for "esc"--i.e. not the numbers in the keyboard tables. The numbers and the system remind me of how it used to work in the old Kermit mail handling program.

Maybe someone can tell me what happened.

Cheers,
David



At 09:18 AM 1/12/2003 -0600, you wrote:
Friends,

I've attached a file called "keycode.xpl" to this email. It is an xpl program or "macro" written a decade ago by Carl Distefano. (I lifted it from a current "u2" file he and Robert Holmgren maintain for XyWriters.)

"XPL" is the macro language from Xywrite, which is hidden in NotaBene.

Save the attachment to disk, in your NB directory (e.g. C:\NBwin).

Start NBwin, go to the command line and type: run keycode.xpl
Execute this command (pressing Enter will do).

Now you will be told the scan code --- the code that identifies the key in a NB keyboard file --- for any key you press. "\", for example, has the code 43, "/" has code 53, the left Ctrl key on my Thinkpad is 29, and the right Ctrl key is 99.

Press the Esc key to exit keycode.xpl. (You'll notice that before it exits it tells you that "Esc" has the code 1.)

Let me know if this doesn't work properly with your NB setup. I'm using 6.1 set up to look and act as much like XyWrite 4.18 (for DOS) as possible.

Myron

-----Original Message-----
From: notabene [mailto:notabene]On Behalf Of Mary Bernard
Sent: Sunday, January 12, 2003 10:14 AM
To: Multiple recipients of list NOTABENE
Subject: Re: F8 toggle between text and comand line

John

"Webopedia" doesn't help with either 'scancode' or 'keyboard file number',
I don't know what scancodes *really* are. But they are the numbers assigned to each key - the physical keys on your real keyboard. The key bearing the letter A (or a), for instance, is always scancode 30. The Spacebar key is scancode 57.

NB keyboard tables use these scancodes. They're what I've called keyboard file numbers.

Call up your NB.KBD and page down till you see

TABLE=

That's the unshifted table. Keep going till you see

30=a

The next table is Shift, and

30=A

In Caps, 30=A; in Caps Shift, 30=a. - As you'd expect.

After those 4 tables, though, NB uses the keys for more complicated purposes. Ctrl+30 defines the whole file (a common windows key combination). Ctrl+Alt+30, for instance, is a+ acute accent.

Now the beauty of an NB keyboard table is that you can do practically anything with it. If you're really crazy, you could even redefine the letter a. You could make it save your file, for instance. All you'd do would be find key no. 30 in the Unshifted table and change it thus:

30=bc,s,a,xc

Now you have no letter A, but you're saving your file every time you hit the key. Well, you could improve on that. How about saving your file every time you hit the letter a? Redefine the key like this:

30=bx,s,a,q2,a

You're unlikely to want to do this, because for most people there are times when they want to type without saving the result till they're sure they like the changes; but you could if you wanted to.

For that matter you could switch a and s.

30=s
31=a

And you can move most keyboard definitions to other keys, if you would find them more convenient elsewhere (like moving the definition 'AS' to unshifted 66).

This capacity to customize your keyboard table is one of the glories of Nota Bene.

Tony Woozley's CPG, on Rick's website, tells you much more about how to do it.

Mary





-

Mary Bernard
mary_bernard




Main Index | Thread Index