-9

When I hit Ctrl+k I would expect the current line to be deleted instead I get, 'enter code here' inserted.

I find this pretty annoying cos I'm in the habit of using this and other emacs style shortcuts (Mac laptops don't have a numeric key pad, home, end, etc).

I'd consider this a bug because it breaks the standard behaviour of OS X.

This relates to the following other issues:

Ctrl+B in an answer text field on OS X makes text bold instead of moving cursor back

On Mac browsers, Command-L should select the address bar

  • 8
    You could always get rid of the Mac. It would make a useful stand for a potted plant. – slugster Jan 22 '14 at 22:24
  • @slugster Stackexchange developers all have macs. But I bet they're mostly bootcamped :P – Dave Hillier Jan 22 '14 at 22:29
  • They are certainly a pretty machine, but I don't know if I could ever use one. I was an avid Apple fanboi until they brought out the Mac then they lost me - and that was a long time ago :) – slugster Jan 22 '14 at 22:36
  • @DaveHillier errrr, who the hell told you we all have macs? The fact that this comment is posted from OSX matters not. – Nick Craver Jan 22 '14 at 23:28
  • [Insert other random editor that I use] works completely differently and so it's a bug that that behaviour isn't replicated * 1000 – Richard Tingle Jan 23 '14 at 0:08
  • 1
    You could get a better response if you showed that this behaviour is in some way industry standard; that a large number of programs across several platforms use this shortcut – Richard Tingle Jan 23 '14 at 0:10
9

When you are composing a post, shortcut are managed by the site to allow you to access tools faster than to go and click on them (that's why they're called shortcuts).

  • Control + B gives you bold text
  • Control + L gives you link dialog
  • Control + K give you code snippets
  • ...

This is by design and not a bug. Also, it shouldn't be changed.

| improve this answer | |
  • 3
    Great, sure, you obviously don't use a mac laptop. It is a design decision, but IMO the wrong one given the consequences. – Dave Hillier Jan 22 '14 at 22:06
  • 6
    @DaveHillier: Perhaps the mac laptop design should be changed to be more in line with other operating system keyboards. Windows and Linux users don't seem to have an issue. :-P – Ken White Jan 22 '14 at 23:29
7

This answer is in lieu of an official answer from a SE employee.

StackExchange uses the pagedown editor, which is derived from the original WMD Editor and modified with a bunch of StackExchange driven features and bug fixes. At a quick glance it would seem that the keystroke code that needs to be modified starts about here, although I couldn't speculate how much extra work or changes it would take to effectively accommodate any modifications.

In the meantime I would suggest you replace the tag with - it's certainly working as designed (so isn't a bug), and the new tag may help get an official response from a team member. It's not unreasonable to ask for the platform specific modifications, but as with any feature request it takes time and effort to implement, the ROI has to be worth it.

| improve this answer | |
0

I use both a Mac laptop and a Mac desktop (but admittedly I don't use emacs). Both Ctrl+K and +K work the same, and the way I want them to. I write my code, then highlight, and hit Ctrl+K or +K. It indents the code and formats it as a code block, just as I would expect. Even works in chat. I never hit +K before entering any code (in fact I didn't even know that it would do anything if no text was highlighted, and only tried it because of this question).

I don't think I want this key combination to suddenly start deleting lines, and I doubt the entire audience of the entire Stack Exchange network wants to re-learn their key commands because you don't like the way it is now (and how it has worked for years). Perhaps you could find some type of add-in that intercepts your keystrokes, translates them, and re-submits.

| improve this answer | |

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .