LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 12-26-2012, 06:10 PM   #1
makeyourself
LQ Newbie
 
Registered: Dec 2012
Posts: 20

Rep: Reputation: Disabled
Bash inputrc Question


Hi, basically I've got Bash fully working on an Android device that I have and the inputrc initialization file is also fully working. I understand that it could be argued that this is not technically a Linux question but aside from the fact that Android runs on a Linux kernel, this question is almost exclusively related to Bash and inputrc.

My problem is that the Enter/Return keys do not appear to be mapped properly when I enter a terminal. What is happening is that the enter Enter key outputs "^J" instead of "^M" (Ctrl+M also outputs "^J" instead of "^M").

I do not understand the format of the keybindings in the inputrc file, e.g.
Code:
"\e[8~": end-of-line
and all attempts to find out what they mean has only confused me more. So I would like to know is it possible to recognize "^J" as the Enter key or something analogous to that and how do I do it?

EDIT: As all problems I've encountered regarding the keymapping issue has so far been isolated to nano text editor I found a solution by instructing nano to make the following keybinding in the file ~/.nanorc with the code:
Code:
bind ^J enter all

Last edited by makeyourself; 12-31-2012 at 10:56 PM. Reason: Add info regarding solution, minor corrections
 
Old 12-31-2012, 04:15 PM   #2
User\ Name=`echo $USER`
LQ Newbie
 
Registered: Oct 2012
Location: Oklahoma
Distribution: Red Hat, Ubuntu, Mac OS X
Posts: 25

Rep: Reputation: 4
If you have found the solution, please mark this tread as solved.

If I misread your Edit, here is a decent page I found about .inputrc functions and how to set them properly.

Hope this helps.
 
Old 12-31-2012, 10:58 PM   #3
makeyourself
LQ Newbie
 
Registered: Dec 2012
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by User\ Name=`echo $USER` View Post
If you have found the solution, please mark this tread as solved.

If I misread your Edit, here is a decent page I found about .inputrc functions and how to set them properly.

Hope this helps.
Done, sorry I'm new here and didn't notice that particular convention in use
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Binding /etc/inputrc to MySQL CLI hakmed Linux - General 0 12-07-2006 12:55 PM
inputrc trouble Amicus Linux - Newbie 2 04-16-2006 07:04 PM
Global Values do not work in /etc/inputrc? Akhran Debian 1 09-14-2005 10:12 AM
inputrc vs profile calutateo Linux From Scratch 4 07-08-2005 08:18 AM
creating /etc/inputrc file in Chapter 7.7 chakkaradeepcc Linux From Scratch 2 05-13-2005 06:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:44 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