In a control's displayed text, a single & marks the
character that becomes that control's hot key. In a BBjStaticText
(for example "&Name:"), Alt+N moves keyboard focus to the
next input control in the window -- the static text itself has no focus to receive,
so its hot key moves focus onward instead of activating the label. A literal
& that should display as itself, including one produced by an HTML
entity, must be written as &&.
The doubled-ampersand escape is how BBj's control-text hot-key convention
tells a literal ampersand apart from a hot-key marker; without it, a single
& in ordinary text would be silently consumed as a hot-key marker
and the following character would be underlined instead of an ampersand appearing at
all.
The keyboard-navigation reference page documents this Alt+key behavior for
buttons, check boxes, radio buttons and menus, but does not mention
BBjStaticText even though the same hot-key convention applies there too
-- a BBjStaticText's hot key moves focus to the next input control
rather than activating the (non-interactive) label itself, which is easy to miss if
an agent assumes the reference page's list of controls is exhaustive.
Keyboard Focus Navigation and the Default Button -- the Alt+key hot-key behavior for buttons, check boxes, radio buttons and menus.
Owner verdict, 2026-09-26 (recorded in this project's OWNER-NOTES.md, row 8):
confirms the BBjStaticText case and the && escape.
A hot key on a static text label that moves focus to the next input control when the user presses Alt+N:
lbl! = wnd!.addStaticText(101,10,10,100,25,"&Name:") PRINT lbl!
A literal ampersand in control text, escaped so it displays as itself:
lbl! = wnd!.addStaticText(101,10,10,100,25,"&&Name:") PRINT lbl!