A Nota Bene FAQ
Keyboard Tips 1: Spring 1999--March 2000
Keyboard User Tips for NB5
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.
Download a 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.
Date insertion
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:
;DEFINITIONS
KEYS=105
ALLT=56,98
CAPPS=58,T:C
LCTRL=29
RCTRL=99
LSHIFT=42
RSHIFT=54
MOUSE=105
;
Works fine.
- - - - - - - - -
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:
9=&X,G,W,&X,&,I,&X,&,B,&X,G,N
Why not use built-in functions, thus:
9=YD,DW,BX,(,m,d, ,b,i,),YD
or, to conserve memory (3 bytes’ worth):
9=YDDWBX(,m,d, ,b,i,),YD
To exclude the trailing space (or other trailing separator) from the MoDe change, try this:
9=YD,DW,CL,DM,DZ,BX,(,m,d, ,b,i,),YD
or, again omitting the comma after funcs:
9=YDDWCLDMDZBX(,m,d, ,b,i,),YD
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:
http://www.zdnet.com/pcmag/pctech/content/16/09/ut1609.001.html
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:
<ALT>ef
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:
http://www.macros.com
- - - - - - - - -
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:
##=bc,N,T, ,0,xc,ch,gt
##=xp,bc,s,e, ,\,N,T,0,\,xc,gt
##=xp,bc,s,e,b, ,\,N,T,0,\,xc,gt
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:
##=gt,•
##=dx,xp,bc,s,e, ,\,•,\,xc,gt,do
##=dx,xp,bc,s,e,b, ,\,•,\,xc,gt,do
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:
74=mv
78=cp
You can also add these to the Ctrl table:
74=rd
78=ud
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:
rem remember
int interest
- then typing ‘rem’ and striking the appropriate key combination will produce:
remembered/remembering/remembers
interested/interesting/interests
-ED
; redefined to -ed (expands abbreviations)
##=ni, ,bd,e,d
-ING
; defined to -ing (expands abbreviations)
##=ni, ,bd,i,n,g
-TION
; redefined to -tion (expands abbreviations)
##=ni, ,bd,t,i,o,n
-S
; redefined to ‘-s’ (expands abbreviations)
##=ni, ,bd,s
-’S
; redefined to Run APOST (inserts ’s, expands abbreviations)
##=dx,bx,r,u,n, ,c,:,\,n,b,5,\,x,p,l,\,A,P,O,S,T,Q2,do
[This definition requires my program APOST.]
Autosave/auto-uppercase/auto-replace
This toggles Autoreplace on and off:
##=az
This toggles Autosave on and off:
##=bx,r,u,n, ,\,n,b,5,\,x,p,l,\,a,u,t,o,s,a,v,e,.,r,u,n,xc
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
Copy/move
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
74=MV
Unshifted 78 - redefined to Grey plus (copy)
Copy defined block to cursor position
78=CP
These 2 do the same for Ctrl Grey minus and plus (move define, copy define):
Delete defined block to clipboard
74=RD
Copy block from clipboard
78=UD
Cursor movement
These were mostly in NB4, and can be useful:
Top left of screen
##=hm
Top right of screen
##=hm,le
Bottom left of screen
##=dx,bs,lb,do
Bottom right of screen
##=bs
To beginning of previous line
1##=pl
To beginning of next line
1##=nl
To end of previous line
1##=pl,le
To end of next line
1##=nl,le;
Previous sentence
1##=dx,pw,ps,ns,cl,nw,do
Next sentence
1##=dx,ns,cl,nw,do
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
##=dx,cl,bc,s,e,b, ,+,wl,ws,+,,ch,ff,cr,do
Move cursor to separator after next word
##=dx,bc,s,e, ,+,wl,ws,+,,ch,cl,ff,do
Define beginning/end
These were in NB4 - very useful.
Go to beginning of define
##=db
Go to end of define
##=de
Defining
Define word
##=dw
Define whole file
##=tf,df,bf,df
Define line, but not carriage return, if any
##=ni,lb,df,le,df
Save define As
##=bc,s,a,d, ,
Directories
This changes to the DEFAULT subdirectory and displays the directory:
##=bc,c,d, ,\,N,B,5,\,U,S,E,R,S,\,D,E,F,A,U,L,T,xc,&X,#,X,D,bc,d,i,r,xc
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.
##=bc,c,a, ,cc,xc
This opens Window # D and calls the directory. You need to have chosen the NB windows (fixed windows) option in Preferences, Window options.
##=&X,#,X,D,bc,d,i,r,xc
Files: Call, append, merge, new, Save, abandon, close program,
This abandons a file without prompt:
##=bc,a,b,xc,bc,r,s,xc
Append to file
##=bc,a,p,p,e,n,d,
Call file
##=bc,c,a,
Call file from G subdirectory
##=bc,c,a, ,\,N,B,5,\,G,\
Merge file
##=bc,m,e, ,
New file
##=bc,n,e, ,
Run [program]
##=bc,r,u,n,
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.
##=no,ni,bc,a,b,xc,bc,a,b,xc,bc,a,b,xc,bc,a,b,xc,ex
Keyboard
Call NB.KBD:
##=bc,c,a, ,\,n,b,5,\,u,s,e,r,s,\,d,e,f,a,u,l,t,\,n,b,.,k,b,d,xc
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 NB.KBD
##=bx,l,d,k,b,d, ,c,:,\,n,b,5,\,u,s,e,r,s,\,d,e,f,a,u,l,t,\,n,b,.,k,b,d,Q2,
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
Save ORD.LIB
##=bc,s,a,l,i,b, ,O,R,D,.,L,I,B,xc,bc,D,o,n,e,gt
Phrases
Show 1 phrase
##=SK
Run PHRASES.RUN - shows all phrases
##=bc,r,u,n, ,\,n,b,5,\,x,p,l,\,P,H,R,A,S,E,S,.,R,U,N,xc
[needs my program, PHRASES.RUN]
Save (assign) phrase to current phrase library
##=SV
Punctuation
Diaresis
##=…
N dash
##=–
M-dash
##=—
Change punctuation
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
Quotes
Put single smart quotes round previous word:
##=bx,r,u,n, ,\,N,B,5,\,x,p,l,\,Q,U,O,T,W,O,R,D,.,R,U,N,xc
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
##=bx,r,u,n, ,\,N,B,5,\,x,p,l,\,L,H,-,Q,U,O,T,E,.,R,U,N,xc
Put opening smart double quotes in text; uppercase next letter entered
##=bx,r,u,n, ,\,N,B,5,\,x,p,l,\,L,H,-,D,B,L,-,Q,.,R,U,N,xc
They both require my programs LH-QUOTE.RUN
and LH-DBL-Q.RUN.
Search/change
Change verified
##=bc,c,v, ,/,/,cl
Put the Enter character in searches
##=ni,^,P
Window actions, other screen, etc. Plus split, minimize etc.
AS (alternate screen - other window)
##=AS
Close text window
##=MW,c,l
Tile all text windows
##=MW,a,r
Minimize text window
##=MW,w,i
Maximize text window
##=MW,r,m
Current text window Full screen
##=MW,w,f
Minimize program
##=MW,m,n
Maximize program
##=MW,m,x
Restore program
##=MW,r,s
Current (split) window to full size [Untile window]
##=MW,w,f
Misc
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.
##=ni, ,bd
Type in Context mode - new text is entered in the mode under the cursor
##=MX
Jump to character no. __ in file
##=bc,j,m,p,
Transpose lines
##=dl,lu,lu,lb,mv
Sort
##=bc,s,o,r,t,xc
Date delta in text
##=bc,d,a,xc
Queries: Anybody know what these do?
What do these 2 keys do? They’re described as: balance L and R - what does that mean?
##=BL
##=BR
What does this key do? It gives a message: Customization file requires a file label [not included in Rick Penticoff’s keyboard files]
##=&X,P,$
|