Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
Created attachment 190 [details]
Conflicting Key Bindings
The Default scheme has some conflicting key bindings as can be seen on the
Shift+Meta+K - Clean
Shift+Meta+K - Toggle code focus
Shift+Meta+T - Go to Type...
Shift+Meta+T - Step Out
Shift+Meta+D - Go to File...
Shift+Meta+D - Find References
Sebastien, please explain.
guivho: I think he was just pointing to a similar report of conflicting keybindings.
Could you review the default keybindings and propose the changes that we should make?
Additionally, the Home, End, Shift-Home and Shift-End seem to not have the right defaults in MonoDevelop (go to start of line, end of line, extend selection to start of line, and extend selection to end of line).
Looks like guivho's list is complete.
That said, looking at these keybindings I have to wonder:
Clean vs Toggle code focus
What the heck is "Toggle code focus" and who uses that? Where is it in the menus? Right now, Shift+Meta+K invokes Build/Clean so it seems clear to me that no one could possibly be using "Toggle code focus" with the current bindings so unless there's a menu item for it, we could simply remove its binding and no one would ever know.
That said, I doubt Build/Clean is used often enough to require a keybinding, so if Toggle code focus is important to have a binding for, that might be worth considering.
Go to Type vs Step Out
Both important commands IMHO, but I'd vote that Step Out is probably far more widely needed.
Go to File vs Find References
Shift+Meta+D probably belongs with Go to Reference more, simply because it pairs with Go To Declaration which is bound to Meta+D.
The default keybinding in Visual Studio for "Edit.Find All References" is Shift+F12, though, if we want to be more consistent with VS. Go to Definition is simply F12 in VS. Then again, F12 and SHift+F12 are bound to VolumeUp (and QuietVolumeUp) on MacOSX and you can't seem to override them.
Go to File seems to open up a dialog with a "search" textbox at the top and a really big empty listbox below it. While I can see this being handy in big projects, I'm not sure it deserves a key binding by default (unless we can find an unused one). Or how about Shift+Meta+O since really it's just File/Open with some special semantics to make it easier to find the file in the project. Of course, assigning Shift+Meta+O conflicts with StepOver so that would have to be reassigned...
Okay, how about this?
Toggle code focus --> <nothing>
Go to File --> Shift+Meta+O
Step Into --> Meta+I
Step Out --> Shift+Meta+I
Step Over --> Shift+Meta+U
I think the debugger stepping keybindings should be close to one another (as does Microsoft with VS, unfortunately they use F10 for Step Over and F11/Shift+F11 for Step Into/Step Out which we can't seem to capture on MacOSX)
Code focus is this: http://mjhutchinson.com/journal/2011/03/monodevelop_tips_code_focus
Clean should have a keybinding, all major IDEs do. And Go to File is *really* important to anyone who's actually used it.
For an explanation of how we choose default keybindings, see http://mjhutchinson.com/journal/2011/02/06/key_bindings
Generally on Mac we prefer Xcode's bindings for the default scheme. A number, including most of these, need to be updated to Xcode 4, which changed substantially from Xcode 3.
It would be nice to have a separate VS-like keybinding scheme, but as you note, VS replies heavily on F keys that aren't easily accessible on Mac (you need to use the Fn-key to access them).
Home and End keybindings are correct, that's how they work on Mac. Use command-left, command-right fir functionality equivalent to Home and End on other OSes.
Build/Clean isn't bound to anything in Visual Studio.
That said, Xcode4's bindings are as follows:
Clean: Shift+Meta+K (same as what MD is now)
Step Into: F7
Step Over: F6
Step Out: F8
All those F-keys are available for use in MD if we want them.
Then it's easy to assign Shift+Meta+O to Go to File (which makes more sense as a binding than what we have now)
All we'd have to do is find a new binding for Toggle code focus...
How about Control+F? It's currently unused...
Created attachment 217 [details]
List of Xcode 4 commands and shortcuts
Let's not bind Toggle Code Focus. I'm not sure why we made it a command at all, it should have been a pref.
I'm in two minds about just taking the bindings from Xcode. There's some value in matching the big Mac IDE, but also some value in taking good ideas from other sources like TextMate, and it's also nice to have some consistency in MD across platforms and/or versions.
Since the debugger stepping keys came from Xcode, it makes sense to update them, though
using F keys will suck for people who don't know how to access use the function keys on Mac. Note that Cmd-Shift-O is more akin to MD's "navigate to" than MD's "go to file" (see my blog for the difference, maybe we don't need Go to File bound).
It would be good to audit some other bindings to match Xcode. I've attached a full list of Xcode 4.0 commands and bindings I made some time back.
I suppose once we start using F keys there's no excuse not to have a VS-like keybinding scheme. But bear in mind that VS has about 4 different schemes depending what you choose when it first starts up.
The Keyboard Preferences on a Mac present the option to
[Use all F1, F2 etc. keys as standard function keys.
When this option is selected, press the Fn key to use the special
features printed on each key.]
I realize it's my personal preference, but as a developer I have this
option turned on. This allows me to use directly function keys mapped in
my .vimrc as well as in .emacs, and I just use Fn + whatever to use the
Basically I just want to say that you might well map Function keys, and
OSX users have the option to use them with or without the fn key.
guivho: ah, I did not know that - thanks for the info!
I think I'll be turning on that option... ;-)
I almost *never* want to hit volume-up/down and I'm always hitting those keys.
Michael: If we decide to follow VS keybindings for Windows, I'd recommend using the scheme you get when you choose C# as your default language.
Created attachment 224 [details]
This patch is a first-pass at a new keybinding scheme for MacOS X which tries to mimic Xcode4's keybindings where ever possible.
Also, no more conflicts :-)
Looks good to me on a quick skim, except for one thing - why remove the dynamic abbrev binding? Would alt-/ conflict with any other MD or Xcode binding?
Yes, it conflicts with CommentSelection
Dynamic Abbrev was set to Command+/, not Alt+/ (remember to look at the macShortcut, not shortcut)
I know, I was asking why you didn't change it instead of removing it :)
Ohhh. Yea, I suppose we could make Dynamic Abbrev Alt+/ instead. I don't think would conflict with anything. I'll check in a bit.
Created attachment 225 [details]
Okay, so the previous patch was too invasive for 2.8...
Now for a simpler change:
How about this?
Dynamic Abbrev: Command+/ => Alt+/ (so we can bind Command+/ to Comment Selection)
Toggle Code Focus: Control+Shift+K => <nothing> (conflicts with Clean Build)
Comment Selection: <nothing> => Command+/ (same as xcode4 and also a logical binding)
Fold Methods & Properties: <nothing> => Alt+Command+Shift+Right (same as in xcode4)
Format Document: <nothing> => Control+I (same as in xcode4)
Find & Replace: <nothing> => Alt+Command+F (same as xcode4)
Replace in Files: <nothing> => Alt+Command+Shift+F (same as xcode4)
Goto Type: Command+Shift+T => Alt+Shift+T (to prevent conflicts with Step Out)
Goto File: Command+Shift+D => Alt+Shift+O (to prevent conflicts with Find References)
With these bindings, the Goto XYZ commands now all use Alt+Shift+Letter and the debugging commands are all Command+Shift+Letter
I committed the latest patch
Created attachment 242 [details]
Okay, this new patch keeps Command+Shift+T bound to Goto Type (which I think I prefer) and changes the binding for Step Out to be Command+Shift+U (which puts all of the debugger commands next to one another on the keyboard, added bonus - "U" seems kinda intuitive for "step up")
Created attachment 243 [details]
Even simpler patch...
* Rebind "Step Out" to Command+Shift+U (now consistent with Command+Shift+I and Command+Shift+O for "Step In" and "Step Over"; was Command+Shift+T; conflicted with "Goto Type")
* Rebind "Find references" to Command+Shift+R (was Command+Shift+D; conflicted with "Goto File")
* Rebind "Dynamic abbrev" to Alt+/ (was Command+/)
* Bind "Comment selection" to Command+/
* Remove binding for "Toggle code focus"
* Added bindings to previously unbound commands:
+ Bind "Fold Definitions" to Command+Alt+Shift+Right (same as xcode)
+ Bind "Format Document" to Control+I (same as xcode)
+ Bind "Search & Replace" to Alt+Command+F (same as xcode)
+ Bind "Find Next" to Alt+Command+Shift+F (same as xcode)
Switched to 2.8 yesterday.
Same conflicting keybindings are still present :(
yea, my patch is still sitting in limbo...
*** Bug 1658 has been marked as a duplicate of this bug. ***
fixed in git master