8

Many applications have already established the shortcut Ctrl+K for modifying the hyperlink of text. You should stick with what people have been used to for many years rather than trying to redefine a standard.

Please make Ctrl+K the shortcut for the hyperlink button (right now it is Ctrl+L).

Update:
Here's a list of programs that use this shortcut:

  • Apple TextEdit
  • Apple Mail
  • Evernote
  • Google Docs
  • Open Office Writer
  • Microsoft Excel
  • Microsoft Outlook
  • Microsoft PowerPoint
  • Microsoft Visio
  • Microsoft Word

On the Mac, the keyboard shortcuts use the Command key rather than the Control key. However this is essentially equivalent as you can see by examining the other similarities between keyboard shortcuts on the Mac and PC. For example, Ctrl+S and Command+S are both used for Save, Ctrl+W and Command+W are both used for Close Window, etc.

7
  • 10
    How about we just get rid of the stupid key bindings? Hmmm, yes, this sounds like a good idea.
    – Josh K
    Commented May 15, 2010 at 4:03
  • Apple TextEdit uses Command-K, that's a different key altogether. ;-) (Ctrl-K deletes until the end of the line, like dmckee noted.)
    – Arjan
    Commented May 15, 2010 at 15:33
  • True, it is Command+K. You will notice that most Mac shortcuts that use Command are equivalent to the same shortcuts that use Ctrl on a Windows system. That's why I bound my Ctrl key (on a PC keyboard) to Command. I can now use Ctrl+S, Ctrl+W, Ctrl+N, on the mac and get the same exact shortcuts I expect to get in Windows.
    – Senseful
    Commented May 15, 2010 at 20:23
  • Ah, so you're messing with your keyboard layout and then asking others to change things for you? ;-)
    – Arjan
    Commented May 15, 2010 at 21:04
  • 1
    Actually I'm mainly using the site on a PC with unaltered keys. If this doesn't change, I will probably just create a simple AutoHotkey script that binds Ctrl+K to Ctrl+L on this website.
    – Senseful
    Commented May 15, 2010 at 22:00
  • 1
    "You will notice that most Mac shortcuts that use Command are equivalent to the same shortcuts that use Ctrl on a Windows system." Er...you have the sense of this backwards. Commented May 17, 2010 at 6:47
  • I instinctively use the keyboard shortcuts found on / supported by my other applications. Cmd+K = insert link. Also Cmd+Enter is increasingly used to submit/post something (I'd like to see this get more support from SE sites and elsewhere).
    – Drewdavid
    Commented Mar 23, 2021 at 19:54

5 Answers 5

6

You can have my Stack Overflow Keyboard shortcuts when you pry them from my cold, dead body.

1
6

I'm posting this answer to express my support of such a change (that is, replace Ctrl + K to use to insert a link rather than backticks).

While it's great that there's a keyboard shortcut for inserting backticks, I suggest to change it to something else, and I'll expand upon @Senseful's reasons. Ctrl + K is conventionally used instead to insert a link, such as on (in addition to the examples listed in the duplicate question: the Microsoft Suite, OpenOffice, Google apps, etc.):

  • LibreOffice / OpenOffice
  • Inbox by Gmail
  • Gmail
  • Google spreadsheets
  • Discourse websites
  • Medium.com and associated blogs
  • GitHub

On the other hand, I agree that it is not a big deal if Ctrl + L overrides selecting all text in the address bar, since the user can just click out of the editing box and then press Ctrl + L to select all text in the address bar, as @Lee Louviere points out. I guess that also it's not a big deal to get used to using Ctrl + L on Stack Exchange sites, while using Ctrl + K everywhere else, but I hope you can see that this is not ideal. Using [test](<insert link here>) is also not that difficult either. But if it's not difficult to change the shortcut then I think it would be better to do so.

3

I'd prefer that C-k didn't bind to anything in the editor, because I want it to get the Firefox binding as "delete-to-end-of-line" just like RMS intended.

This is worse, because C-a and C-e do what I expect them to do.

2
  • 1
    +1: I want the browser's standard shortcuts and just those, not some poxy hack that someone else thought was useful in some other random browser. Commented May 15, 2010 at 17:31
  • 1
    I guess the best solution is to have a setting that can be enabled for people that like to use keyboard shortcuts; similar to how Google did it for search results where it is opt-in.
    – Senseful
    Commented May 15, 2010 at 21:06
2

Err. Sorry, but Microsoft Word really isn't "most" applications. Ctrl+L is much more intuitive for people who don't edit links in MSWord on a regular basis.

9
  • The only problem is when you want to edit the location bar address by hand and the WMD editor catches the shortcut. But it's quite uncommon, so I put up with it.
    – perbert
    Commented May 15, 2010 at 2:19
  • 1
    I added more examples.
    – Senseful
    Commented May 15, 2010 at 2:27
  • I guess I still dont see what the problem is with just editing the link manually in the editor.. I mean the text is all right there, why do you need a popup to edit the link inside? Commented May 15, 2010 at 2:32
  • 1
    There are several reasons you want to use the built in link-editor rather than editing it in the source directly: you might not know the syntax required to enter a link (or simply forgot it); you might not want to scroll all the way down to enter the link's location, then have to scroll all the way back up; the dialog automatically reindexes links in case you add one between a few others.
    – Senseful
    Commented May 15, 2010 at 2:37
  • I guess. But I still don't think that most people are constantly editing links in the examples you gave. As they are mostly word processors, and not HTML editors Commented May 15, 2010 at 2:52
  • 2
    Just because Ctrl+L seems more correct to you, doesn't mean that you should go ahead and use it. You should stick with conventions that people are used to. It's the same exact reason why we still see floppy disks as the save icon in many programs. It would be more correct to replace the floppy disk with a hard drive icon. However, if you did that, people wouldn't understand what it means. When people see a floppy disk icon, they immediately know what it means. So no matter how correct it may be to replace the icon (or shortcut in this example), it's better to stick with what people are used to
    – Senseful
    Commented May 15, 2010 at 20:27
  • 3
    @ea - I totally agree it should be what people are most used to. However, I disagree with your statement that CTRL+K is the "most used" shortcut. That is what my problem is. Commented May 15, 2010 at 21:23
  • 2
    True, most users probably don't even use shortcut keys. However, if Microsoft, Apple, and Google all decided to use the same shortcut, that probably means that there are a significant amount of users that are used to this shortcut.
    – Senseful
    Commented May 15, 2010 at 21:58
  • -1 In most applications, the control that has focus can override control shortcuts. If you put a office control in another app that already uses Ctrl-???, the office keystroke will only activate if the office control has focus. These are common enough reflexes, that if a keystroke doesn't do what's expected, most people click outside of the focused control and try again. Commented Sep 10, 2012 at 12:09
0

Because my comment received a decent amount of attention, I'll state it as a more complete answer.

Why would you want key bindings on a web application? Does anyone know how terribly inconvenient it is that you're f*cking with user defined settings?

Example: I'm a heavy keyboard user. I don't like the mouse at all, especially if my hands are already on the keyboard. Command + L happens to switch to the address bar in just about every browser I use (Safari, Chrome, Firefox). What happens if I'm in a answer box and I hit it? The script hijacks my computer and thinks I'm trying to insert a link.

This is just as bad as sites that read the settings and use a Flash / Javascript combination to full screen a site. I'm sorry, sometimes I don't want that!

This is exactly why the target="_blank" attribute has been dropped in XHTML and HTML5. You don't have the right to tell the user where the link should open up, they will open it how they want.

Either provide an option to turn it off, allow users to individually remap the commands to their liking, or stop doing it.

6
  • I think the on/off option is a good one. However, you still need to decide which key will be used when it is "on" (at least as the default). I think "k" should be used rather than "l" in that case. This sounds like it should be another feature-request though, which should also contain this well written answer.
    – Senseful
    Commented May 16, 2010 at 3:06
  • I believe you see my leaning towards "just leave it off" stance.
    – Josh K
    Commented May 16, 2010 at 3:25
  • Yeah... your use of bold kinda gave it away
    – Senseful
    Commented May 16, 2010 at 3:43
  • 2
    I'm also for disabling the feature. I use Ctrl+L in Firefox all the time (it's a shortcut to get focus to the adress bar). There should be an option to disable the hotkey feature. If I really want, I could define some external macro to preformat my links/do other thing easily.
    – colemik
    Commented Sep 1, 2010 at 16:09
  • 1
    -1 In most applications, the control that has focus can override control shortcuts. If you put a office control in another app that already uses Ctrl-???, the office keystroke will only activate if the office control has focus. These are common enough reflexes, that if a keystroke doesn't do what's expected, most people click outside of the focused control and try again. I would think that a keyboard heavy user would be accustomed to this. As long as it doesn't override the default Tab logic, you should be fine. Commented Sep 10, 2012 at 12:11
  • stackoverflow.com/a/48255558/5033247 Commented Oct 17, 2020 at 13:03

You must log in to answer this question.

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