'@' on MacBook 2,1 - revisiited

1 Antwort [Letzter Beitrag]
GNUbahn
Offline
Beigetreten: 02/19/2016

I have had issues with '@' earlier and never solved it the last time. Below is a copy of an advise proposed by Eemeli (https://trisquel.info/en/forum/librebooted-and-trisquelised-macbook21-where#comment-123269)

According to that (and earlier comments), re-configuring the keyboard should add "KEYMAP_TOGGLE=lv3:enter_switch" to "/etc/vconsole.conf"

But there is no /etc/vconsole.conf file on my computer(s). So where can I modify to add the line?


I guess that the old instructions which used "sudo dpkg-reconfigure keyboard-configuration" caused this to happen:
- adds the line "KEYMAP_TOGGLE=lv3:enter_switch" to "/etc/vconsole.conf"

However there was maybe a recent update which made this line stop working. At least it stopped working on my laptop with Parabola.

There is another way to make the keypad enter act as an AltGr, however it requires more fiddling around. If you mess up and can't type properly after rebooting, you might need to start your computer with a live cd to fix the problem. Here goes:

WARNING: tested only on Parabola GNU/Linux! Not tested on Trisquel!

1) the idea is to make your own keymap file. Read "man loadkeys". At least on Parabola with the Mate desktop, once the AltGr works in the console, it will work also in the desktop.

2) go to console, e.g. Alt + Ctrl + F2 (or F3, F4, etc until your are prompted for the login), and log in with an account that can use sudo.

3) make sure you have the correct keyboard loaded, i.e. in your case the Danish one. For me I ran "sudo loadkeys fi" to make sure that the default Finnish keymap is loaded.

4) we are going to read the raw keycodes in console: run "showkey" and press the keypad enter (on my laptop it gives the keycode 96). Wait 10 seconds for showkey to quit.

5) Save the current keymap into a file: run "dumpkeys > keymap.orig"

6) Then search for "= AltGr". On my laptop you find it looking like this:

keycode 100 = AltGr AltGr AltGr AltGr AltGr AltGr AltGr

7) Copy that line (use nano or emacs or vim, whichever text editor you are familiar with in the console), and go to the line starting with "keycode 96 =", and paste it there. Change the AltGr keycode into 96 from 100 (use the keycode you got from step 4!), and remove the line for keypad enter. Alternatively on the starting with "keycode 96 =" change all mentions of "KP_Enter" into "AltGr". Save this file as "enter_switch.map". For me the difference of these files looks like this:

$ diff enter_switch.map keymap.orig
504c504
< keycode 96 = AltGr AltGr AltGr AltGr AltGr AltGr AltGr
---
> keycode 96 = KP_Enter KP_Enter Hex_F KP_Enter KP_Enter KP_Enter KP_Enter

7') Before going forward and making changes to your system, try if this keymap works: "sudo loadkeys enter_swith.map". If it works, go to step 8. If not, try to figure out what went wrong. Reload defaults by running "sudo loadkeys -d".

8) Copy the file "enter_switch.map" into "/etc/enter_switch.map", and modify "/etc/vconsole.conf" to add the line

KEYMAP=/etc/enter_switch.map

9) Then reboot and your keypad enter should work as an AltGr in console.

10) If you messed up, run "loadkeys -d" if you can and then remove the changes made in step 8. If you can't type anything meaningful, you should boot a live cd, mount your hard drive, and remove the line "KEYMAP=/etc/enter_switch.map" from "/etc/vconsole.conf".

GNUbahn
Offline
Beigetreten: 02/19/2016

SOLVED!

In a sort of weird way: After re-installing libreboot, Trisquel and libre-linux - with no effect - I tried to re-configure a different key (left side logo-key). That worked, and re-re-configuring to use the key-pad enter once again, it now works as intended.