You are not logged in.
Dear Forum,
I can't bind C-Return in vim using urxvt:
nnoremap <buffer> <C-Return> :call SClang_block()<CR>
Above has no effect at all - it essentially produces "Return". CTRL-v - CTRL-Return does produce ^M, which in my knowledge is in order.
I've tried the following in my Xdefaults:
URxvt.keysym.Control-Return: <Control-Return>
With no effect, it simply prints it as a string.
C-Return can be bound to other values using ascii-code, such as:
URxvt.keysym.Control-Return: \033\015
Meaning workarounds are possible by way of ascii octal codes, unfortunately - they cannot produce a simple "CTRL", or "RETURN"...
If anyone has any idea, I'd be very thankful. I'm sure that I'm overlooking something simple.
Best,
Garbochock
Offline
Why do you think this is urxvt specific? Have you successfully used this key binding in other terminals or the tty? The vim documentation doesn't seem to indicate that "Return" is a key notation, "Enter" is.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Well, I assume that when I press C-Enter, urxvt sends a value to vim, and looking at people with similar problems this seems to be the case.
I did actually manage to bind ctrl+enter in vim, as ctrl+v, ctrl+enter produces ^M in urxvt - and looking at this I found that <CR> could be used as the character for bind.
As it happens, ^M is also the output of shift+enter, so I don't really know how to make a ctrl+enter specific bind. Anyhow if there is no better alternative perhaps someone else can make use of this...
Edit: Ehm, ok, nevermind - <CR> just binds the Enter-key, regardless of any ctrl or shift business.
Last edited by garbochock (2015-09-10 13:07:27)
Offline
WTF? Why assume all this. The documentation clearly shows how to bind Ctrl+Enter. Why assume this is a urxvt issue when you could so easily test it in a TTY or another terminal? Why assume that <CR> is how to bind Ctrl-Enter when it is not in the documentation (it is listed as how to produce a carriage return, not bind one).
I give up. It seems you like having this problem.
"UNIX is simple and coherent" - Dennis Ritchie; "GNU's Not Unix" - Richard Stallman
Offline
Offline
Well, assuming these folks are correct it seems my best shot is to do with a workaround, thanks.
WTF? Why assume all this. The documentation clearly shows how to bind Ctrl+Enter. Why assume this is a urxvt issue when you could so easily test it in a TTY or another terminal? Why assume that <CR> is how to bind Ctrl-Enter when it is not in the documentation (it is listed as how to produce a carriage return, not bind one).
I give up. It seems you like having this problem.
No need being rude Trilby, it seems my assumptions (although possibly premature) was correct. Unless I wan't to switch over to Gvim or switch terminal, I'm supposedly stuck with this issue.
Last edited by garbochock (2015-09-10 13:56:40)
Offline
Raynman wrote:Well, assuming these folks are correct it seems my best shot is to do with a workaround, thanks.
Well, that's not the only source. I even thought I'd seen something in vim's help, once upon a time (at least about Shift), but this was the best I could come up with after a quick search.
Last edited by Raynman (2015-09-10 14:30:14)
Offline