Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Enabling Right Alt and Shift+Tab for emacs on linux console.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 418

PostPosted: Fri Jan 31, 2020 8:29 am    Post subject: Enabling Right Alt and Shift+Tab for emacs on linux console. Reply with quote

Most people would set keymap to "us" in /etc/conf.d/keymaps in order to use US keyboard layout on linux console.
If you set keymap to "us" in /etc/conf.d/keymaps, /usr/share/keymaps/i386/qwerty/us.maps.gz is loaded by loadkeys during boot.
/usr/share/keymaps/i386/qwerty/us.maps.gz comes from sys-apps/kbd which is from linux kernel community.

Right Alt is mapped to AltGr, and Shift+Tab is mapped to Alt+Tab in /usr/share/keymaps/i386/qwerty/us.maps.gz.

If you want to map Right Alt to Alt and Shift+Tab to Shift+Tab in linux console, follow the steps below.

  • Create /usr/share/keymaps/i386/qwerty/better-us.map.gz (You can use a different name than better-us.map.gz)
    Code:
    include "us.map"
    include "linux-with-two-alt-keys"

    alt keycode 15 = Meta_Tab
    shift keycode 15 = F26
    string F26 = "\033[Z"

  • Set keymap to "better-us" in /etc/conf.d/keymap
  • Reboot
  • After reboot, you will be able to press Right Alt and Shift+Tab in emacs on linux console.

I suspect someone infiltrated linux kernel community to sabotage linux virtual terminal so that more people are driven to MacOS or windows.
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6637

PostPosted: Fri Jan 31, 2020 5:58 pm    Post subject: Reply with quote

I suspect this toxic outburst is intended to do the same...
Back to top
View user's profile Send private message
CaptainBlood
Veteran
Veteran


Joined: 24 Jan 2010
Posts: 1679

PostPosted: Fri Jan 31, 2020 9:08 pm    Post subject: Reply with quote

Interestingly, I came to a similar clue while using only fr keyboards such as keymap="fr-latin1" or keymap="fr-latin9", the latter being the only of the two to allow the euro symbol.
Unfortunately it lacks some Alt combos & friends, which is a big issue for console'd emacs, e.g. Alt-y.

I haven't implemented anything yet, as the general point of view here is to have as much as common keyboard shortcuts doing the same thing between console, xorg and wayland, which does require quite a lot of homework.

I didn't investigate other keyboard localization; Quite surprised even us keymap in console hardly match the multi-decade old "PC styled keyboard".

Maybe the progressive advent of Xorg & friends has been a knock-out blow on the development of console keymaps, the classical ones at least.

Thks 4 ur attention.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 418

PostPosted: Fri Jan 31, 2020 11:31 pm    Post subject: Reply with quote

Ant P. wrote:
I suspect this toxic outburst is intended to do the same...


Calling my post a toxic outburst is easy when you don't want obvious problems of the current keymaps to be addressed.

The vast majority of US layout keyboards don't have AltGr. Also, there is no good reason to map Shift+Tab to Alt+Tab unless the keymaps were neglected after testing them with esoteric keyboards or in esoteric environments.

It could have been done out of neglect or malice. I haven't ruled out malice, yet.

Perhaps, you can make a case for AltGr, but I don't see a case for mapping Shift+Tab to Alt+Tab by default other than through inertia or malice.

There is a good case for modifying us.map or creating a variant of us.map.


Last edited by crocket on Sat Feb 01, 2020 1:54 am; edited 10 times in total
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 418

PostPosted: Fri Jan 31, 2020 11:34 pm    Post subject: Reply with quote

CaptainBlood wrote:
I didn't investigate other keyboard localization; Quite surprised even us keymap in console hardly match the multi-decade old "PC styled keyboard".

Maybe the progressive advent of Xorg & friends has been a knock-out blow on the development of console keymaps, the classical ones at least.


The keymaps could have been neglected, too. I will discuss changes with maintainers.
Back to top
View user's profile Send private message
Hu
Moderator
Moderator


Joined: 06 Mar 2007
Posts: 15623

PostPosted: Sat Feb 01, 2020 1:53 am    Post subject: Reply with quote

Given that most people don't stay in the text console for any longer than necessary to get X11 or sshd up, I doubt sabotaging that would be an effective way to drive people away from Linux.
Back to top
View user's profile Send private message
crocket
Guru
Guru


Joined: 29 Apr 2017
Posts: 418

PostPosted: Sat Feb 01, 2020 1:54 am    Post subject: Reply with quote

Hu wrote:
Given that most people don't stay in the text console for any longer than necessary to get X11 or sshd up, I doubt sabotaging that would be an effective way to drive people away from Linux.


That's a good point... But, it's still good to have a keymap that maps Right Alt to Alt and Shift+Tab to Shift+Tab. Sometimes, I need to use linux virtual terminal. When I use GNU readline on linux virtual terminal, Alt+f is best pressed with Right Alt and `f`.

If someone was trying to sabotage linux, the person simply couldn't keep up with the size and enormity of linux ecosystem. Linux ecosystem is simply too big for a person or an entity to control. The mighty redhat couldn't capture Gentoo Linux and a few other distros.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum