Ctrl-k Hijacking in Editor

Ctrl-k is a combination commonly used in UNIX systems (including OS X) for killing text (basically delete + cut). You can learn more about it here or just do a search for “kill yank unix”. Right now the text editor hijacks this combination to insert pre-formattted text, breaking OS level key bindings.

I’d like to submit a PR to rebind pre-formatted text to Ctrl-j, but I want to know if you are interested in this change before I get started (if you are not interested I think I’ll just release something in the form of a browser plugin and paste a link here for the three other nerds like me :smile: ).

PS: The same case could be made for Ctrl-b, Ctrl-l on Windows and maybe Ctrl-r. Is this editor the same one used in StackOverflow? Same issues apply there.

Shouldn’t Ctrl-K set a hyperlink like in almost every other program I’ve ever used? Having it delete cut would be VERY confusing the vast majority of users imho.

Sorry for not being clearer: In Unix systems Ctrl-k already does a delete+cut (a.k.a. kill). I’m not proposing Discourse to adopt this, I’m just asking not to overwrite it with the “pre-formatted text” shortcut. If your system does not kill with Ctrl-k already, you won’t notice anything besides the k -> j thing.

I think it would be better to use the Ctrl + Shift modifier for all editor shortcuts…

1 Like

@gerhard’s suggestion makes much more sense than applying the Ctrl-j band-aid. Is the team interesting in seeing this implemented?

Sure, as long as it is tested in most common browsers!