Saturday, April 22, 2017

Microsoft Excel Mac, keyboard shortcut to edit in cell



In Microsoft Excel for Mac 2011 (14.0.0) how can I modify the enter/return key to edit in cell instead of moving the selection down? I know that in Preferences > Edit you can uncheck the box that says "After pressing RETURN, move selection [Down/Right/Up/Left]" which at least makes it a little less annoying, but this behaviour is still not productive.




I'm aware I could emulate the effect using Automator, macros, Butler and whatnot but I prefer not to use a third-party application to do this. I'm open to modifying the system preferences and I'm comfortable using the Terminal, though.



EDIT: I found out here http://www.electrictoolbox.com/keyboard-shortcuts-excel-mac/ that CTRL+U is the keyboard shortcut for edit in cell. Now if it were somehow possible to remap that to CMD+Return by editing some plist file or writing some magic formula in the Terminal, it would be perfect!


Answer



Excel does not offer a direct way to customize this: it is neither a menu command (which would be available to OS X’s system wide shortcuts), nor is it a shortcut configurable via Office’s dedicated Tools → Customize Keyboard… (approximate translation, I’m on a German system) dialog – as you can easily test by calling the dialog and pressing Ctrl+U in the Add Shortcut box (no assigned shortcut will be shown).



You can, however, work around the issue by remapping Cmd+Return to Ctrl+U using Takayama Fumihiko’s KeyRemap4MacBook (which, despite its name, will work on any Mac running OS X 10.4 upwards). You will have to add a private.xml configuration file to KeyRemap4MacBook like documented on the KeyRemap4MacBook site, with its XML content looking like this:








Remap "Edit in Cell" in Excel
Use Command+Return instead of Ctrl+U
private.app_excel_commandreturn_to_ctrlu
EXCEL
--KeyToKey-- KeyCode::RETURN, VK_COMMAND, KeyCode::U, ModifierFlag::CONTROL_L





– this will restrict the remapping to Excel (for a complete list of the keycodes used by KeyRemap4MacBook, see its source code).


No comments:

Post a Comment

hard drive - Leaving bad sectors in unformatted partition?

Laptop was acting really weird, and copy and seek times were really slow, so I decided to scan the hard drive surface. I have a couple hundr...