Swap '[' / ']' and '(' / ')' keys on PicoCalc


#1

One thing that makes typing Lisp into the PicoCalc a little cumbersome is that the parenthesis keys ( and ) require pressing the Shift key (Shift+9 and Shift+0 respectively).

The square brackets [ and ] on the other hand have dedicated keys on the PicoCalc keyboard, so I decided to just swap the two in software.

To do this, I added this small section to the top of the void ProcessKey (char c) function in the uLisp code:

  // Swap [] and ()
  if (c == '(') c = '[';
  else if (c == ')') c = ']';
  else if (c == '[') c = '(';
  else if (c == ']') c = ')';

Now the [ ] keys will enter ( and ), and Shift+9 and Shift+0 can be used to enter [ and ] if needed.

I imagine this isn’t a change that everybody will like, but sharing it here in case others prefer remapping the [ ] keys as well.