Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I don't have a complete solution, but I have some possible approaches you can try, if you haven't looked at them yet.</p> <p>MATLAB's keyboard shorcuts are saved in an <code>XML</code> file in <code>/Users/$user/.matlab/$version/$name_keybindings.xml</code>, where <code>$user</code> is your user name, <code>$version</code> the version of MATLAB and <code>$name</code> is whatever you've saved the keybindings as. It looks something like this</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;CustomKeySet derivedfrom="Mac" modifieddefault="false"&gt; &lt;Context id="Global"&gt; &lt;Action id="eval-file"&gt; &lt;Stroke alt="on" code="VK_ENTER" meta="on" sysctrl="on"/&gt; &lt;/Action&gt; &lt;stuff here /stuff&gt; &lt;/Context&gt; &lt;/CustomKeySet&gt; </code></pre> <p>I tried changing the <code>derivedfrom</code> value to <code>EmptyBaseSet</code> to see what happens. As expected, none of the shortcuts work, but <code>Opt</code>-<code>character</code> still reproduced a unicode character. This seems indicates that the <code>Opt-f</code> or any option based shortcut behaviour is due to Mac, and out of MATLAB's hands. It's the Windows equivalent of pressing <code>Alt</code>+numpad keys for unicode characters. If MATLAB knew about the option shortcuts, it would indicate a possible conflict in <code>MATLAB&gt;Preferences&gt;Keyboard&gt;Shortcuts</code>, but it doesn't. I don't know enough <code>XML</code> to tell you whether or not you can disable <code>Opt-f</code>=<code>ƒ</code> by editing this file.</p> <p>My guess is that there is a very high probability that Apple has ensured that applications don't get to tinker very much with this feature, as several non-English (German/Slavic/Latin) languages use these keyboard shortcuts very often.</p> <p>An alternate option is to try <a href="http://scripts.sil.org/cms/scripts/page.php?site_id=nrsi&amp;id=ukelele" rel="nofollow noreferrer">Ukelele</a>, which is a keyboard layout editor for macs. There have been questions on S.O. and related sites, where they've used Ukelele to <a href="https://stackoverflow.com/questions/455799/how-can-i-eliminate-dead-keys-on-mac-os-x-with-international-keyboard">remap dead keys</a>,<a href="https://apple.stackexchange.com/questions/10761/how-to-disable-composite-keys-on-mac-os-x">another example for dead keys</a>, <a href="https://stackoverflow.com/questions/3250686/configure-the-left-and-right-mac-command-keys-differently">configure the left &amp; right <code>Cmd</code> differently</a>, <a href="https://apple.stackexchange.com/questions/8787/swap-key-permanently">swapping € and $</a>, etc. You can try redefining your keyboard layout to disable <code>Opt-f</code> (unless if you need that particular character outside of MATLAB), which should solve the problem.</p> <p>Lastly, I don't mean to be saying "you should be doing something else" when the question is "how do I do this?", but in general, with macs, I've found mapping <code>Ctrl</code> to the windows/emacs <code>Alt</code> shortcuts to be easier than <code>Opt</code>. Mostly, for the very same reasons, and also because <code>Opt</code> is so damn close to the <code>Cmd</code> key on my laptop that my fat fingers end up pressing <code>Cmd</code> when I don't mean to (it never happens the other way around).</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload