I collected these tips from the Nota Bene list between spring 1999 and the end of March 2000. They are very roughly in order of collection. They include the name and usually the email address of the person who posted them. From early 2000 I began keeping the date of posting as well.
These tips presumably work for the contributor, but bear in mind that they may not work with all operating systems (Windows 3.x/95/98/NT,etc.) and hardware configurations.
I have included a number of key definitions of my own, which have never been posted to the list. They work for me in Windows 98.
I hope people will send me their key definitions for inclusion in the next Keyboard Tips file.
print-friendly NBWin copy of this FAQ here
(v. 1.0, April 2000, 9k
Windows reserved keys
I can reprogram (via the KBD) file the WINDOWS reserved keys but not override them. By this I mean they will do the new assignment AND do the WINDOWS reserved assignment.
Is there a way to construct a template that will automatically enter the current date into a letter (without it having to be typed in), but will not change the date every time the file is called to the screen (as the MS Word default does), thus obliterating the original date of composition?
Iíve done this in both the old and the new NB. Edit the keyboard file so that the key you wish to use for a date has code like that below. I use control-D.
In the section for control + keys:
;;Iím putting the date in here:
32=bc,t,o,d,a,y,xc,&X,fl,xc,ld,ld ;; this works
;32=&X,t,o,d,a,y,xc ;; doesnít seem to work
Line feed and CR characters
If you click on the Special Characters button on the Find and Replace menu, it provides Line Feed (alone) and Carriage Return (alone) characters.
Using L and R Ctrl/Alt, or Caps, as separate kbd tables
Early on there was some discussion on whether, in NBWin, it is possible to write new keyboard tables based on the 2nd ctrl or alt key. There was some optimism, but has anyone actually succeeded in building a new .kbd table for, say, CTRLX=99 or ALTX=98? I tried both approaches to no avail.
The keyboard Iím using under v5.002 is:
- - - - - - - - -
At the heart of my customizing strategy is redefining CapsLock as Control so that cursor movement and deletions across characters and words can be executed by the left hand alone. Most of this mimes old Wordstar commands. They used the "diamond" formed by keys s, e, d and x for cursor up (e), down (x), character right (d) and character left (s). Ctrl g deletes and character and ctrl-t deletes a word. The system can obviously be expanded
for other movements and edits.
In my efforts at customizing NBWin, I have (pretty) successfully redefined
CapsLock as controlx.
However, the ctrlx key (formerly CapsLock) manifests a curious ambivalence. It works as both control and capslock! If I hold it down, I can move the cursor and delete a character as noted. However it is simultaneously working as a CapsLock/change case. When I resume writing after doing the movement or edit, Iím in all uppercase or back in lower, depending on how many times it got pushed!
Wildcards, keyboards, entering with ASCII#s
The method of entering a wildcard on the command line, pressing first caret (Ď^í), then the symbol for the wildcard type, works with the standard NB.KBD but does not work with the Swedish.kbd (which I (try to) use, as the Swedish standard is virtually identical with the Finnish one). Maybe this is the case with the Spanish keyboard, too. The problem is not that the caret would be in another keyboard slot, it isnít there in the first place! (Or it is only in a form that produces an accented character when followed by certain other characters.)
For those who use a keyboard file that lacks the plain caret, I can think of two remedies:
- add a definition for it in a .kbd slot, or
- enter the caret directly using its decimal ASCII code, 94
When you know the ASCII # of a character, you can enter it in the file or command line by pressing CTRL+SHIFT and typing the number(s) using the number keys above the regular alphabetic keys (not the keypad keys).
Making print mode changes work on words with apostrophes
I tried to define a key to put a word in bold-italic style. It works fine--except for words with an apostrophe. ...I have defined the key as follows:
Why not use built-in functions, thus:
or, to conserve memory (3 bytesí worth):
To exclude the trailing space (or other trailing separator) from the MoDe change, try this:
or, again omitting the comma after funcs:
Either of these should solve the problem of the excluded apostrophe.
Defining by Phrase - keydefs from NB3 that work in NB5
I note some old discussions in the archive about restoring the "highlight by phrase" function from NB-DOS. Can anyone supply me with the key codes that will make that work in NBWin?
The Ďdefine phraseí key definition in NB3 is:
##=ni,dx,yd,bc,s,e,b, , ,ws,ws,xc,nw,df,bc,s,e, , ,ws,ws,xc,bc,cc,cl,nw,df,do
The key defs for moving the cursor to the previous and next phrase are (prev. 1st):
##=dx,pw,bc,s,e,b, , ,ws,ws,xc,bc,gt,nw,do
##=dx,cr,bc,s,e, , ,ws,ws,xc,bc,gt,cl,nw,do
These all work in NBWin. The Ďdefine phraseí definition highlights only 1 phrase at a time, as in NB3, whereas the NB4 definition let you highlight 1 phrase, then another, additively, which was a distinct advantage. However, being able to define even 1 is better than nothing.
The key def for deleting by phrase is:
##=dx,yd,df,bc,s,e, , ,ws,ws,xc,bc,cc,cl,nw,bc,s,e,b, , ,ws,ws,xc,bc,cc,cr,df,rd,do
- and for backdeleting by phrase:
##=dx,yd,df,pw,bc,s,e,b, , ,ws,ws,xc,bc,gt,cl,nw,df,rd,do
CapsLock and Ctrl: Exchanging the keys
Left Shift, Left Alt, Left Ctrl - put them in a line down the LHS
With ZDkeymap (freeware) you can achieve the ultimate old-time NBerís dream: left-hand ctrl, shift and lock in 1 straight line down the LHS.
The site is:
Itís more complicated than just swapping Caps and LeftCtrl. Hereís the sequence. (Important: donít Swap the keys. Use Reassign, and reassign each key in turn, using the left and right panes of ZdkeyMap.
- Click on Caps Lock in the left pane and Left Ctrl in the right pane, then click Apply.
- Then Left Ctrl in the left pane and Left Alt in the right; click Apply.
- Then Left Alt in the left pane and Caps Lock in the right; click Apply.
That should do it.
Override NBís hardwired key defs with Macro Express
Iíve discovered that my shareware macro program, Macro Express, will overpower NB5ís hard-coded ctrl keys, such as Ctrl S, Ctrl F and Ctrl O. It will do a great deal else besides. Itís by far the best of the shareware macro/remapping programs Iíve tried.
For example, Ctrl F is hardwired to show the cumbersome Find Menu. I want it to produce, instead, a simple ĎSe //í string, with the cursor between the slashes ready for me to type. This MEX macro does it:
<F9>se //<LEFT ARROW>
I then wanted to move the Find menu definition to another key. But in NB5 it wonít work when moved to another key. However, it can be accessed via the menus. So I defined a key in MEX to do Alt, Edit, Find, thus:
It works. And these 2 macros work only in NB5, because you can have program-specific macros in MEX, not just global ones; which greatly increases its usefulness and flexibility.
Other things MEX will do for NB5:
- put an command on the command line and execute it.
- run a sequence of commands, e.g. you could get it to call a file and then to change all occurrences of StringA to StringB.
- run XPL programs.
A few of the dozens of other things it will do, in all Windows programs:
- you can remap all alphanumerics and punctuation keys (but not CTrl Shift Alt NumLk or Caps, alas).
- It contains a reminder-macro maker which is better than any W98 alarm Iíve found (almost none of them will run a reminder every 40 minutes, say - ME will).
- It contains an abbreviation-expansion thing like NBís (I just type Ďemí and it inputs my email address).
- lauch programs, resize windows, shut down /restart the computer, etc etc etc.
You can make macros by:
- writing them directly (the language is very simple, and there are buttons to help you input commands)
- via a Scripting Editor
- by recording keystrokes
- via a macro-making Wizards.
You can use the same key combinations over and over in different programs, for you can have both global and program-specific macros. And you can construct popup menus of macros.
Popup menus of macros enable the NB5 user to run the equivalent of NB4ís user help screens. They allow you to run about 20 programs by pressing an NB key combination (which calls up the screen) and a letter or number (which runs the program).
This paragon of a program can be got at:
- - - - - - - - -
I want a method for opening the New File dialogue without having to "Alt-F N" (because thatís the only way to use long file names in NBWin).
If you get Macro Express, you could do it with a macro that did just what you do when you click through the menu: Alt F(ile) N(ew), then Shift Tab to put your cursor in the blank filename field instead of on the silly icon.
A place marker like NB4ís
NB4ís place marker was pretty good. NB5 has bookmarks, which donít survive from session to session, and annotations, which do. I donít like doing things through the menus, so I defined 3 keys to place a NT0 marker in the text and search forward and backward for it:
The problem with these is that you canít delete the NT0 marker in graphics mode. So Iíve changed to a little square dot much like the marker in NB4. (itís on uppercase 2 in the Insert, Special Characters, Text Characters menu). The key defs are:
Grey Minus and Grey Plus
If youíre used to them from NB4, thereís no reason not to have them in NB5, where the keys are only minus and plus and not doing much. These definitions added to the Unshifted table will do it:
You can also add these to the Ctrl table:
Striking Ctrl 78 will then present you with an Undelete/Clipboard Text menu, - the equivalent of NB4ís Clipboard menu - from which you can select a block to undelete (including blocks from previous NB sessions).
I canít find this menu described in the Help file (but I havenít looked very hard). ĎRDí isnít in the vanilla NB.KBD, so I suppose there must be other ways of accessing this menu; but it was new to me.
From my keyboard file
These are customizations Iíve made to my NB5 NB.KBD. Most of the key definitions are very simple; and quite a few of them are just ways of adding to the NB5 keyboard things we could do on the NB4 keyboard.
Add /change suffix:
These definitions add suffixes to words. They speed up typing quite a bit, once you get used to them, especially the keys for Ďtioní and Ďísí, which can be tricky to type right. If you have an abbreviation defined in your spelling dictionary, these keys will expand it. For instance, if in your spelling dictionary you have:
- then typing Ďremí and striking the appropriate key combination will produce:
; redefined to -ed (expands abbreviations)
; defined to -ing (expands abbreviations)
; redefined to -tion (expands abbreviations)
; redefined to Ď-sí (expands abbreviations)
; redefined to Run APOST (inserts ís, expands abbreviations)
[This definition requires my program APOST.]
This toggles Autoreplace on and off:
This toggles Autosave on and off:
This toggles AutoUppercase and AutoReplace on and off and puts a prompt to that effect on the command line.
##=bc,A,Z, ,&, ,A,U, ,t,o,g,g,l,e,d,gt,az,bx,a,u,q2
These 2 make Grey Minus and Grey Plus work as they do in NB4:
Unshifted 74 - redefined to Grey minus (move)
Move defined block to cursor position
Unshifted 78 - redefined to Grey plus (copy)
Copy defined block to cursor position
These 2 do the same for Ctrl Grey minus and plus (move define, copy define):
Delete defined block to clipboard
Copy block from clipboard
These were mostly in NB4, and can be useful:
Top left of screen
Top right of screen
Bottom left of screen
Bottom right of screen
To beginning of previous line
To beginning of next line
To end of previous line
To end of next line
These two move the cursor to the end of the previous word or the end of the current word, for you to add something (a suffix, or punctuation) that you forgot to put there.
Move cursor to separator (usually space) before previous word
Move cursor to separator after next word
These were in NB4 - very useful.
Go to beginning of define
Go to end of define
Define whole file
Define line, but not carriage return, if any
Save define As
This changes to the DEFAULT subdirectory and displays the directory:
If the cursor is on a filename in a directory this will call the file. It works only from a directory called with F9 dir F10, not from the directory in the Open file menu.
This opens Window # D and calls the directory. You need to have chosen the NB windows (fixed windows) option in Preferences, Window options.
Files: Call, append, merge, new, Save, abandon, close program,
This abandons a file without prompt:
Append to file
Call file from G subdirectory
If you want to quit NB5 without being asked if you want to save unsaved files, use this. (You also have to have the Ďabandoní option unchecked in Preferences, Prompts.) It works by closing 4 windows - as many as I usually have open at once. If you usually have 10 open, add 6 more Ďbc,a,b,xc,ís.
This key takes you past the Unshifted, Shift, Caps and Caps Shift keyboards, which one doesnít very often change, to the top of the Ctrl table. Strike F10 twice more, and youíre at the Ctrl-Alt-Shift table.
Search for (=)Ctrl in KBD file
##=tf,bc,s,e, , ,=,c,t,r,l,xc
Load and save libraries
##=bc,l,d,l,i,b, ,\,N,B,\,L,I,B,\,O,R,D,.,L,I,B,xc,bc,O,R,D,.,L,I,B, ,l,o,a,d,e,d,cc
Show 1 phrase
Run PHRASES.RUN - shows all phrases
[needs my program, PHRASES.RUN]
Save (assign) phrase to current phrase library
Remove the punctuation following the previous word
##=cl,cr,bc,s,e,b, , ,wa,ws,xc,cr,rc,cr,ch
Put semicolon after previous word
##=cl,cr,bc,s,e,b, , ,wa,ws,xc,cr,rc,;,cr,ch
Put comma after previous word
##=cl,cr,bc,s,e,b, , ,wa,ws,xc,cr,rc,co,cr,ch
Put full stop (period) after previous word
##=cl,cr,bc,s,e,b, , ,wa,ws,xc,cr,rc,.,cr,ch
Put colon after previous word
##=cl,cr,bc,s,e,b, , ,wa,ws,xc,cr,rc,:,cr,ch
Put question mark after previous word
##=cl,cr,bc,s,e,b, , ,wa,ws,xc,cr,rc,?,cr,ch
Put sequence Ďspace dash spaceí after last word
##=cl,cr,bc,s,e,b, ,/,wa,ws,/,xc,cr,rc, ,-,cr,ch
Remove dash after previous word
##=cl,cr,bc,s,e,b, ,/,wa,ws,/,xc,cr,rc, ,-,cr,ch
Put single smart quotes round previous word:
This requires my program QUOTWORD.RUN
The following 2 are useful if you write dialogue:
Put opening smart single quotes in text; uppercase next letter entered
Put opening smart double quotes in text; uppercase next letter entered
They both require my programs LH-QUOTE.RUN
Put the Enter character in searches
Window actions, other screen, etc. Plus split, minimize etc.
AS (alternate screen - other window)
Close text window
Tile all text windows
Minimize text window
Maximize text window
Current text window Full screen
Current (split) window to full size [Untile window]
This key expands abbreviations without adding a separator (which you then have to backdelete. Useful for inserting/expanding an abbreviation right before an existing punctuation mark, for instance.
Type in Context mode - new text is entered in the mode under the cursor
Jump to character no. __ in file
Date delta in text
Queries: Anybody know what these do?
What do these 2 keys do? Theyíre described as: balance L and R - what does that mean?
What does this key do? It gives a message: Customization file requires a file label [not included in Rick Penticoffís keyboard files]