11

Bug introduced in 10.2

  • System: Linux

Once updated to 10.2, my Alt+} and Alt+) do not return a pair of brackets but a single right one, as if Alt is not pressed. Alt+] still works.

Mr.Wizard
  • 271,378
  • 34
  • 587
  • 1,371
Chromatic
  • 794
  • 4
  • 13
  • I cleaned your question. I have the same issue, so changes to your KeyEventTranslations.tr are not the issue. Additionally, I added the standard header for bugs. – halirutan Jul 26 '15 at 12:49
  • Thanks. Good to know it is not just me... – Chromatic Jul 26 '15 at 12:52
  • Just for the record, I'm running Windows and don't have the problem. Actually, I didn't know about that shortcut until I read this post. Thanks! – Mitchell Kaplan Jul 26 '15 at 20:20
  • @Chromatic Would you mind to try this on your Linux box? http://mathematica.stackexchange.com/q/89184/187 – halirutan Jul 27 '15 at 09:33
  • @halirutan Tried, not reproducible. Maybe you could try "Show expression" to find any clue? – Chromatic Jul 27 '15 at 10:16
  • I'm absolutely clueless why this happens. I noticed that everything is f*cked up after I paste something in the notebook (I first noticed it while answering a question and using OP's code). I then even specifically looked at the hex-codes of the complete clipboard to make sure nothing bad and invisible is pasted into Mathematica. I reported it to support. Let's see what they can make of it. Thanks for trying. – halirutan Jul 27 '15 at 10:45
  • In linux I noticed similar problem , e.g. that things like ctrl+shift+7 do not produce nice superscript anymore, but some very weird symbol. Do you also have that problem as well? – Neven Caplar Jul 27 '15 at 14:43
  • 1
    @NevenCaplar ctrl + 6 for nice superscript works. – Chromatic Jul 28 '15 at 19:21
  • @Chromatic Thx, indeed it works :) – Neven Caplar Jul 28 '15 at 21:03
  • On Linux with German keyboard ctrl+shift+7 should produce fractions. However, this is somehow broken in the 10.2. As a workaround I remapped fractions to ctrl+alt+7 by adding Item[KeyEvent["7", Modifiers -> {Control,Command}], "Fraction"] to KeyEventTranslations.tr – vsht Aug 15 '15 at 16:38
  • @Chromatic Is this something you still experience beyond 10.2? I'm running v10.4 over Ubuntu 15.10 and both Alt+} and Alt+) work as expected. – Emilio Pisanty May 18 '16 at 15:51
  • @EmilioPisanty I've been using the answer below since then. Good to know they fix this bug now. – Chromatic May 20 '16 at 11:34

1 Answers1

6

If you add this to your KeyEventTranslations.tr file it works on Linux (I only tested english keyboard layout):

 Item[KeyEvent["}", Modifiers -> {Command, Shift}],
    FrontEndExecute[{
        FrontEnd`NotebookWrite[FrontEnd`InputNotebook[], "{", After],
        FrontEnd`NotebookWrite[FrontEnd`InputNotebook[], "}", Before]
    }]
    ],

    Item[KeyEvent[")", Modifiers -> {Command, Shift}],
    FrontEndExecute[{
        FrontEnd`NotebookWrite[FrontEnd`InputNotebook[], "(", After],
        FrontEnd`NotebookWrite[FrontEnd`InputNotebook[], ")", Before]
    }]
    ],

If so desired (and if I find time) I could add this to the Shortcuts` package.

Rolf Mertig
  • 17,172
  • 1
  • 45
  • 76
  • (+1) I think it would be convenient to have these in the package. – Alexey Popkov Jul 28 '15 at 08:32
  • @AlexeyPopkov I tried shortly yesterday to update the documentation, but something did not work with my version of Workbench and Mathematica 10.2. I wished it would be easier to write documentation ... – Rolf Mertig Jul 29 '15 at 15:42