What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 127 Stack Exchange communities.

Possible Duplicate:
Formatting Keyboard Shortcuts for Comments

Allowing Ctrl+k in comments has been ignored for a while, but I wanted to extend the feature request.

That question and its answers asks for the keyboard shortcuts for supported formatting, which include:

  • CTRL-B - Bold
  • CTRL-I - Italic
  • CTRL-L - Link
  • CRTL-K - Code Block

I propose that we add the following features:

  • CTRL-G - Graphic
    • Opens the image uploader, allowing imgur links to be inserted without resorting to editing the post to get the WMD uploader. Rather than inserting the ![...][1] markdown, though, it would surround [selected text](http://i.stack.imgur.com/image.png) with the markdown for a titled link insert the bare link to the image.
  • CTRL-Z - Undo
    • Should be obvious....
  • CTRL-Shift-Z - Redo
    • Should also be obvious....

And also that we add the following standardized formatting and associated shortcuts:

  • CTRL-Q - Block Quote
    • Inserts *""*, or surrounds *"selected text"* with this standard quote formatting. enter image description here
  • CTRL-O - Ordered (numbered) List
    • Inserts (1) the next number enclosed in parentheses (2) every time (3) the shortcut is used. Should automatically correct numbering problems. enter image description here
  • CTRL-U - Unordered (bullet) List
    • Unordered lists don't work very well in comments, but you could use () bare parentheses, • a bullet character, or ☃ some other character or character sequence to indicate a list. enter image description here
  • CTRL-H - Heading
    • Surround ***Selected Text:*** in bold italic formatting or add the sequence ***:*** if no text is selected. enter image description here

These standardized formattings would improve consistency, save time, ease readability (if used appropriately), and make the site look better.

This leaves only CTRL-R (Horizontal Line), which really doesn't make sense in a field that doesn't allow line breaks.

share|improve this question

marked as duplicate by Cody Gray, ChrisF, Jeff Atwood Jul 20 '11 at 5:35

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

I considered making [CTRL]-[G] a separate feature request, but took a move from my leaders and added some earmarks... –  Kevin Vermeer Jul 18 '11 at 13:54
This definitely seems like overkill for comments... What are you doing putting images (or links to images) in comments in the first place? –  Cody Gray Jul 18 '11 at 13:58
@Cody - "This definitely seems like overkill for comments " - True, but (1) we've all seen examples of most of these formats typed out in comments, (2) we're already familiar with the shortcuts from the WMD editor so it's nothing new, and (3) as I said, it would improve consistency, save time, ease readability, and make the site look better. –  Kevin Vermeer Jul 18 '11 at 14:04
@Cody - "What are you doing putting images (or links to images) in comments in the first place?" - Um, I'm making comments, some of which require images? I spend most all my time at Electrical Engineering, where schematics and PCB photos are common. –  Kevin Vermeer Jul 18 '11 at 14:06
re: Possible duplicate: Whoops, I was coming from Allowing Ctrl+k in comments and that question wasn't even linked as related. The Greasemonkey script is useful, and I could extend that, but Jeff's comment makes me think this is unlikely to happen. I think my post adds some additional content that's not present in the dupe; may I edit some of my suggestions into that post? –  Kevin Vermeer Jul 18 '11 at 14:09
I'm a little worried that having CTRL+O as ordered list will conflict with the Open function in most browsers. I would maybe have that hotkey be CTRL+SHIFT+L just to avoid confusion. For much the same reason, I would avoid CTRL+N. –  Aarthi Jul 18 '11 at 14:19
Also related: To have CTRL-B to make text bold in comments and the associated Stack Apps script here, which does [CTRL]-[B], [CTRL]-[I], and [CTRL]-[K] –  Kevin Vermeer Jul 18 '11 at 14:24
@AarthiDevanathan: True, but that already happens in the WMD editor. If we change to CTRL+SHIFT+L, we should also change WMD. –  Kevin Vermeer Jul 18 '11 at 14:25
@KevinVermeer Is there a potential alternative? CTRL+P or something? –  Aarthi Jul 18 '11 at 14:41
@AarthiDevanathan: That's "Print" on most platforms. In my browser (Chrome on Mac 10.6), I find that (the equivalents of) CTRL-ACDEFGHJLMNOPQRSTVWXYZ are all taken. The only letter shortcuts which aren't used are B, U, and I. I'd rather have the web application (SO) determine what the shortcuts should be in this context, and tab out of the input box to get normal OS/browser shortcuts when necessary. –  Kevin Vermeer Jul 18 '11 at 14:51
@KevinVermeer Oh wow, I didn't realize. Well, if the comment boxes can have independent shortcut key options then the ones you've listed should be fine. I just felt like I should point out a potential conflict :) –  Aarthi Jul 18 '11 at 15:08
"which really doesn't make sense in a field that doesn't allow line breaks" pssst... half of these suggestions don't make sense in comments for that exact reason! If you want you can edit the first 4 into the dupe, but it's in obvious territory for me. –  Jeff Atwood Jul 20 '11 at 5:35
add comment

1 Answer

No, no, no.

In fact, I would like the editor to stop hijacking the control-k mean "kill to end of line" mapping the firefox gives me and my emacs reflexes.

share|improve this answer
I understand that you disagree, but the issue of the editor hijacking your emacs sequences has been brought up here, here, and here. If you don't like the editor behavior in the first place, then disable it and don't prevent those of us who like it from using it in comments! –  Kevin Vermeer Jul 18 '11 at 19:32
add comment

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