Even stranger - on my keyboard, when I press F18 it behaves as if it is the “A” key, both by itself and in combination with shift, command, and shift-command. Similarly, pressing F19 behaves like the “B” key, also in combinations. For example, in Write mode, shift-F18 will create a rehearsal mark (normally shift-A) if I have a barline selected, and shift-F19 brings up the bars and barlines popover (normally shift-B). Command-F18 selects everything (usually invoked by command-A), command-shift-F18 selects more (same as command-shift-A) Of course, some actions will only happen if I have selected something and/or am in a particular mode (Write mode, for example) - I do know that some key commands will only work in one mode, or have a different behaviour in another mode.
This behaviour is only in Dorico, and does not manifest itself in other applications.
All I can think of is that the keys are being incorrectly recognised either by Dorico, the operating system, or the two interacting. When a key is pressed, it generates a keycode which is then assigned in software to a character, an action, etc. (I think I have got the concept correct). Maybe there is something about the keycodes for F18 and F19 that is somehow similar to those for A and B. Maybe those keypresses are falling through “cracks” in the code and ending up doing something that was not intended. When I tried to teach myself AppleSoft BASIC many, many years ago, one of my most common mistakes was omitting the Return command at the end of a subroutine. Instead of returning to the main body of code and picking up where it left off before jumping to the subroutine, the program would then “fall” through to the next instructions stored in memory, which could be anything at all.
Who knows what the cause is? I certainly don’t.