FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian User

 
 
LinkBack Thread Tools
 
Old 03-10-2012, 03:56 PM
Liu Binsheng
 
Default Ctrl-/ interpreted as Backspace in text console

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.

My laptop is ASUS A8 series. It uses a normal keyboard.

I've installed console-setup, and these are the valid lines in
/etc/default/keyboard:

XKBMODEL="asus_laptop"
XKBLAYOUT="us"
XKBVARIANT=""
XKBOPTIONS="ctrl:nocaps"
BACKSPACE="guess"

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?
--
Liu Binsheng <liubinsheng@gmail.com>


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120310165612.GB6053@debian">http://lists.debian.org/20120310165612.GB6053@debian
 
Old 03-10-2012, 08:39 PM
Florian Kulzer
 
Default Ctrl-/ interpreted as Backspace in text console

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.

--
Regards, |
Florian | http://www.florian-kulzer.eu


--
To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
Archive: 20120310213927.GA26222@isar.localhost">http://lists.debian.org/20120310213927.GA26222@isar.localhost
 
Old 03-12-2012, 01:35 AM
Liu Binsheng
 
Default Ctrl-/ interpreted as Backspace in text console

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 <liubinsheng@gmail.com>


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

Thread Tools




All times are GMT. The time now is 01:54 PM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org