You are not logged in.

#1 2015-08-01 02:42:53

jouissance
Member
Registered: 2015-07-15
Posts: 20

[Solved] Left ALT creating special characters in bash -- disabling?

In a bash shell, my left ALT key creates special characters that I use my compose key for. For instance, alt + g creates 'ã'. This doesn't happen in graphical programs. I don't want this behavior, because I can't navigate a bash prompt well without an alt key. How do I disable it? I can't find any information online, though I'm not sure what to look for. Help appreciated.

Last edited by jouissance (2015-08-04 17:18:22)

Offline

#2 2015-08-01 09:58:23

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [Solved] Left ALT creating special characters in bash -- disabling?

What's the output of

localectl

What DE / WM are you using, what graphical applications?

Offline

#3 2015-08-02 00:41:13

jouissance
Member
Registered: 2015-07-15
Posts: 20

Re: [Solved] Left ALT creating special characters in bash -- disabling?

karol wrote:

What's the output of

localectl
   System Locale: LANG=en_US.UTF-8
       VC Keymap: n/a
      X11 Layout: n/a

What DE / WM are you using, what graphical applications?

I'm using xmonad. I'm thinking this can't be a WM issue because I've remapped its modifier key (ALT by default). I've tried firefox and gimp.

Last edited by jouissance (2015-08-02 00:41:49)

Offline

#4 2015-08-02 08:37:07

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] Left ALT creating special characters in bash -- disabling?

You need to set a VC Keymap in the /etc/vconsole.conf file:

KEYMAP=<your choice>

Offline

#5 2015-08-02 19:34:58

jouissance
Member
Registered: 2015-07-15
Posts: 20

Re: [Solved] Left ALT creating special characters in bash -- disabling?

To be clear, this is a problem with xorg, not virtual consoles. But I tried setting both with

localectl set-x11-keymap us

which was successful, but it didn't change things.

Offline

#6 2015-08-02 21:03:51

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] Left ALT creating special characters in bash -- disabling?

Try to add a variant parameter:

$ localectl --no-pager list-x11-keymap-variants us
alt-intl
altgr-intl
chr
colemak
dvorak
dvorak-alt-intl
dvorak-classic
dvorak-intl
dvorak-l
dvorak-r
dvp
euro
hbs
intl
mac
olpc2
rus
workman
workman-intl

Offline

#7 2015-08-03 06:50:26

jouissance
Member
Registered: 2015-07-15
Posts: 20

Re: [Solved] Left ALT creating special characters in bash -- disabling?

I've tried intl, alt-intl, and altgr-intl with no change to the ALT functionality. I'm not sure which other ones would be relevant.

Offline

#8 2015-08-03 12:41:04

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] Left ALT creating special characters in bash -- disabling?

So your left ALT key is defined as your compose key somewhere, maybe at the graphical terminal configuration stage.
If you use another terminal, do you get the same compose key issue?

Offline

#9 2015-08-03 17:53:35

jouissance
Member
Registered: 2015-07-15
Posts: 20

Re: [Solved] Left ALT creating special characters in bash -- disabling?

I only get the issue in X11 terminals. And I have Caps Lock set as my compose key in .xinitrc:

setxkbmap -option "compose:caps"

The ALT behavior isn't compose behavior anyway.

Offline

#10 2015-08-03 21:22:14

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] Left ALT creating special characters in bash -- disabling?

Sorry I have no idea what ALT behavior you are speaking about.
And there are different X11 terminal programs that you could try.
What is the result of:

setxkbmap -print

Offline

#11 2015-08-04 07:45:46

jouissance
Member
Registered: 2015-07-15
Posts: 20

Re: [Solved] Left ALT creating special characters in bash -- disabling?

berbae wrote:

Sorry I have no idea what ALT behavior you are speaking about.
And there are different X11 terminal programs that you could try.
What is the result of:

setxkbmap -print

xkb_keymap {
        xkb_keycodes  { include "evdev+aliases(qwerty)" };
        xkb_types     { include "complete"      };
        xkb_compat    { include "complete"      };
        xkb_symbols   { include "pc+us+inet(evdev)+compose(caps)"       };
        xkb_geometry  { include "pc(pc104)"     };
};

Happy 1000th post.

Last edited by jouissance (2015-08-04 07:46:31)

Offline

#12 2015-08-04 14:35:54

berbae
Member
From: France
Registered: 2007-02-12
Posts: 1,304

Re: [Solved] Left ALT creating special characters in bash -- disabling?

jouissance wrote:

Happy 1000th post.

Thanks; this doesn't happen every day!

Your left-alt key may be redefined by your window manager; but in this case, I don't understand why it writes something in the terminal.

The only idea I have is to change something (window manager, X11 terminal) for testing, and see if the problem persists.
If not, there will be a direction for searching where the left-alt key is reconfigured.

I have no other idea, sorry.

Offline

#13 2015-08-04 15:54:51

Vain
Member
Registered: 2008-10-19
Posts: 183

Re: [Solved] Left ALT creating special characters in bash -- disabling?

Sounds like you need

XTerm*metaSendsEscape: true

in your ~/.Xresources.

(Adjust accordingly if you're not using XTerm.)

Offline

#14 2015-08-04 17:18:02

jouissance
Member
Registered: 2015-07-15
Posts: 20

Re: [Solved] Left ALT creating special characters in bash -- disabling?

Vain wrote:

Sounds like you need

XTerm*metaSendsEscape: true

in your ~/.Xresources.

(Adjust accordingly if you're not using XTerm.)

Thanks, that did it.

Offline

#15 2015-09-16 22:04:17

jouissance
Member
Registered: 2015-07-15
Posts: 20

Re: [Solved] Left ALT creating special characters in bash -- disabling?

[edit: disregard please]

Last edited by jouissance (2015-09-19 13:11:41)

Offline

Board footer

Powered by FluxBB