2
$\begingroup$

I am reposting this question (Translate key events to nothing?) hoping to resolve an issue that is causing me no end of, bug chasing. Arggh, Help.

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)

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]]
| improve this question | | | | |
$\endgroup$
  • $\begingroup$ Addendum; Dynamic[ControllerState[]] indicates that the touch bar keys are call Touch Button N, where N \in Range[1,11]. I am not sure if this helps. $\endgroup$ – Craig Carter May 1 '19 at 0:09
  • $\begingroup$ What do the cell contents (Cell | Show Expression) of an affected cell look like? $\endgroup$ – Carl Woll May 1 '19 at 2:10
  • $\begingroup$ @CarlWoll Cell[BoxData["\.00"], "Input", CellChangeTimes->{3.7656654818730288*^9}]` $\endgroup$ – Rohit Namjoshi May 1 '19 at 2:12
  • $\begingroup$ Can't you just replace \.00 with nothing in the Find dialog? $\endgroup$ – Carl Woll May 1 '19 at 2:13
  • $\begingroup$ Thanks Rohit. Yes, that’s it. The “.\00” doesn’t appear in the front end. (Silly of me nor to do the shift control e to look, palm slap) $\endgroup$ – Craig Carter May 1 '19 at 2:16
1
$\begingroup$

1) This is a preexisting bug. It's slightly worse in V12 because it's inserting a null byte rather than a control character, and that null byte doesn't seem interceptable.

2) This isn't specific to the touch bar. The same thing happens with an external keyboard.

3) I presume you're noticing this because, like me, you have the touchbar set to show function keys by default. But that's a very non-default configuration. Whereas hitting F1 is pretty easy to do a normal keyboard. So now it's the set of sloppy typists who have touchbars configured to produce function keys, which is perhaps why others haven't commented on this.

4) Possible workarounds for now are to configure the touchbar not to show functions keys and/or get in the habit of using Shfit-Cmd-F instead of F1 to avoid the danger zone.

| improve this answer | | | | |
$\endgroup$
  • 3
    $\begingroup$ It's good to note that the touch bar can be configured on a per-app basis. If OP prefers function keys by default, they can still be turned off for Mathematica only. $\endgroup$ – Szabolcs May 8 '19 at 16:55
  • $\begingroup$ @Szabolcs and Itai. Thanks. I've tried all of the touch bar options and I can't the function keys to not show up with M11/M12 is running. The problem for me is that my fingers slide off the top row of keys too often. I appreciate your help. $\endgroup$ – Craig Carter May 9 '19 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.