LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 02-16-2012, 04:08 AM   #1
haiyuan_victor
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Rep: Reputation: 0
how to let urxvt kow C-enter


i used urxvt, but ,when i input C-enter, it seems that it can not recognize it!
when i use emacs in urxvt, when i type C-enter, it just like input a <Enter>!
how to configure it?thanks a lot!
 
Old 02-16-2012, 06:17 AM   #2
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Maybe this help: http://linux.die.net/man/1/urxvt

Regards
 
Old 02-16-2012, 06:18 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Which combination of keys is C-enter? Ctrl+Enter?

Same behaviour here for Ctrl+Enter.
 
Old 02-16-2012, 06:27 AM   #4
haiyuan_victor
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
Which combination of keys is C-enter? Ctrl+Enter?

Same behaviour here for Ctrl+Enter.
yes,but in my urxvt it dose not work like Ctrl+Enter!
 
Old 02-16-2012, 06:30 AM   #5
haiyuan_victor
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
Which combination of keys is C-enter? Ctrl+Enter?

Same behaviour here for Ctrl+Enter.
it's C+Return
 
Old 02-16-2012, 06:31 AM   #6
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Which version are you using?
 
Old 02-16-2012, 06:39 AM   #7
haiyuan_victor
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ukiuki View Post
Which version are you using?
rxvt-unicode (urxvt) v9.15 - released: 2012-01-21
 
Old 02-16-2012, 06:40 AM   #8
haiyuan_victor
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
URxvt.keysym.C-Return:
it seems to use this, but this setting is not correctly!
 
Old 02-16-2012, 06:44 AM   #9
haiyuan_victor
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
the manul page says:
URxvt.keysym.C-Return: \033<C-Return>

but, i add this to my .Xresources, it can not work either
 
Old 02-16-2012, 06:57 AM   #10
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
What about /etc/X11/app-defaults/Urxvt ? Dunnot which Linux you have but somewhere about there in etc, have you tried to edit there instead?

Regards
 
Old 02-16-2012, 07:48 AM   #11
haiyuan_victor
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by ukiuki View Post
What about /etc/X11/app-defaults/Urxvt ? Dunnot which Linux you have but somewhere about there in etc, have you tried to edit there instead?

Regards
i use fedora 15
 
Old 02-16-2012, 08:46 AM   #12
ukiuki
Senior Member
 
Registered: May 2010
Location: Planet Earth
Distribution: Debian
Posts: 1,030

Rep: Reputation: 385Reputation: 385Reputation: 385Reputation: 385
Quote:
Originally Posted by haiyuan_victor View Post
i use fedora 15
Ok it is probably in etc somewhere.

Regards
 
Old 02-16-2012, 08:34 PM   #13
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
It works for me after adding this line to ~/.Xresources (but not until I had rebooted. Logging off and back on would probably have been enough):
URxvt.keysym.Control-Return: \033<Control-Return>
"C" could have been used instead of "Control".

Testing at a command prompt:
Code:
c@CW8:~$ ^M
[above by using Ctrl+V then Enter]
c@CW8:~$ ^[<Control-Return>
[above by using Ctrl+V then Ctrl+Enter]
c@CW8:~$ urxvt -help
rxvt-unicode (urxvt) v9.12 - released: 2011-12-05
[snip]
EDIT: maybe that didn't work! Maybe it should have shown ^[^M. But it demonstrated that .Xresources is effective.

Last edited by catkin; 02-16-2012 at 08:36 PM.
 
Old 02-17-2012, 08:27 PM   #14
haiyuan_victor
LQ Newbie
 
Registered: Jul 2010
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by haiyuan_victor View Post
the manul page says:
URxvt.keysym.C-Return: \033<C-Return>

but, i add this to my .Xresources, it can not work either
I means that it does not work correctly!
 
Old 02-17-2012, 08:54 PM   #15
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Now using xrdb ~/.Xresources and starting a new urxvt instance instead of logging off and back on (there had to be a better way!) ...

It seems urxvt is taking <Control-Return> as a literal string instead of substituting Control-Return's value:
Code:
c@CW8:~$ read -r
[pressed Ctrl+Enter] 
^[<Control-Return>
c@CW8:~$ echo "$REPLY" | od -a
0000000 esc   <   C   o   n   t   r   o   l   -   R   e   t   u   r   n
0000020   >  nl
0000022
If the input required by emacs is Escape followed by ^M, a workaround is possible using URxvt.keysym.Control-Return: \033\015
After setting that and re-initialising:
Code:
c@CW8:~$ read -r 
^[
c@CW8:~$ echo "$REPLY" | od -a
0000000 esc  nl
0000002
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Urxvt - how to copy text from it? Mr. Alex Linux - Software 7 06-08-2011 11:11 PM
Urxvt color scheme Tripsun Linux - Software 0 02-12-2011 01:52 AM
Unable to enter password in terminal to enter as root.. ANISHKUMAR.R Linux - Newbie 5 08-07-2010 07:46 AM
I need to kow about my type of processor can someone help me repollo Linux - Newbie 2 08-27-2005 09:45 PM
urxvt -e cs-cam Linux - Newbie 4 04-23-2005 05:16 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 10:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration