On a Mac with a touchbar, if my finger slips and hits any of F2-F12, an invisible character .00 is entered. It would be ok if I could see the character and find the error. But, I can’t see it as it is, ummm, invisible. (I’ve been copying and pasting every input to a vi buffer to look for the .00, or showing the cell contents with Shift-Control-E)
Is there any way to make .00 show up as a visible character? Or better yet, map F2-12 to something other than entering a visible character?
I’ve tried adding to KeyEventsTranslations.tr:
Item[KeyEvent["F3"], SelectionHelpDialog[False]]
etc
Item[KeyEvent["F12"], SelectionHelpDialog[False]]
Mathematica 12 doesn’t show the touch bar in ControllerState[].
I’m completely stuck. My only solution so far is to attach an external keyboard.
Go to SystemPreferences->Keyboard->shortcuts. Click on App Shortcuts and click on +. In the dialog you choose “Mathematica” and assign the function keys you hit to an innocuous function or keystroke. For example you can set F2->Evaluate Cell. Now if you hit the function key by mistake it will evaluate a cell and not add any keystrokes.
I also use this to assign menu items without any shortcuts to my own shortcuts. For example, there is no shortcut for making a cell Evaluatable – so I made one.
The other thing you can do is go to the keyboard settings and make the touchbar show something other than the function keys and have the fn key show the function keys when pressed. (this is what I use as a default)