On Sat, Mar 10, 2012 at 10:39:27PM +0100, Florian Kulzer wrote:
> On Sun, Mar 11, 2012 at 00:56:12 +0800, Liu Binsheng wrote:
> > Hi,
> > 
> > When I press Ctrl-/ in the text console, it deletes a char like
> > backspace. But if I use Gnome and press Ctrl-/ in gnome-terminal,
> > Ctrl-/ behaves normally.
> 
>  [...]
> 
> > Here's the results of running `showkey -a` in text console:
> > 
> > Press any keys - Ctrl-D will terminate this program
> > 
> > ^?  127 0177 0x7f           > when pressing Ctrl-/
> > ^?  127 0177 0x7f           > when pressing Backspace
> > /    47 0057 0x2f           > when pressing /
> > ?    63 0077 0x3f           > when pressing ?
> > ^D    4 0004 0x04           > Ctrl-D
> > 
> > The results of running `showkey -a` in gnome-terminal:
> > 
> > Press any keys - Ctrl-D will terminate this program
> > 
> > ^_   31 0037 0x1f           > when pressing Ctrl-/. result differs
> > ^?  127 0177 0x7f           > when pressing Backspace
> > /    47 0057 0x2f           > when pressing /
> > ?    63 0077 0x3f           > when pressing ?
> > ^D    4 0004 0x04           > Ctrl-D
> > 
> > This problem is very annoying because I bind Ctrl-/ to undo in
> > emacs. Could you please provide any suggestions to make Ctrl-/ not
> > behave like backspace?
> 
> You can try
> 
>   echo "control keycode 53 = Control_underscore" | loadkeys
> 
> as root to assign keysymbol 0x1f to the Ctrl-/ combination on the text
> console, assuming that / has keycode 53 on your system, which you can
> verify with "showkey -k".
> 
> I have no idea how this modification interacts with emacs, but it should
> ensure the same behavior on text consoles as in gnome terminal, which
> seems to be what you want to achieve if I understand you correctly.
> 

Thanks a lot. I added it to rc.local, and it works. And I found the
reason here [1].

Maybe I should learn more about keymaps.

[1]  
http://stackoverflow.com/questions/7617866/emacs-doesnt-recognize-c-in-shell-over-ssh

-- 
Liu Binsheng <liubinsh...@gmail.com>


-- 
To UNSUBSCRIBE, email to debian-user-requ...@lists.debian.org 
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20120312023500.GA3300@debian

Reply via email to