Creating a new hotkey in MMBasic

From Goeff’s book on MMBasic.
“The editor is a very productive method of writing a program. Using the OPTION Fnn command you can
program a function key to generate the command “EDIT” when pressed. So, with one key press you can jump
into the editor where you can make a change. Then by pressing the F2 key you can save and run the program.
If your program stops with an error you can press the edit function key and be back in the editor with the cursor
positioned at the line that caused the error. This edit/run/edit cycle is very fast.”

I have tried several entries for OPTION Fnn trying to create a hotkey for F6 and cannot seem to make it work. What am I missing? Any assistance appreciated. Thanks

Hello,

I successfully added 2 Fn key on mine:

OPTION F1 files
OPTION F6 chdir "

Useful for navigation on SD Card

I’m using the Pico 2 firmware from @guu

1 Like

I keep getting Error : Expected a string.

Here is the instructions I used to create mine:

option escape
option f1 “files\n”
option f6 “chdir \q”

The “option escape” is needed if you want to translate the escape sequences “\q” and “\n” (“\q” for quote and “\n” for new line).

Hey @gilwood See below screenshot of the function/method where you can do the change, in my example I added an option for F6 that sets context to drive B and runs the file named Menu. It is a single line change, line 1042 in my case.

To set up a custom Fn hotkey in MMBasic, use the following syntax:

OPTION F8 “RUN “+chr$(34)+”myprog” +chr$(34)+chr$(13)+chr$(10)

On my PicoCalc, I configured F6 to launch rgpapp’s Picocalc Commander (PCC) file manager by running the following command:

option F6 "RUN "+chr$(34)+"b:/pcc" +chr$(34)+chr$(13)+chr$(10)

If curious:
chr$(34) = Double Quotes
chr$(13) = Carriage Return
chr$(10) = Line Feed

3 Likes