You are not logged in.

#1 2017-05-14 17:14:55

LithoUser
Member
Registered: 2016-11-17
Posts: 139

No appropriate keymap for the console

Hello,

I can't set the correct keyboard variant in console. The wiki page keyboard configuration in console doesn't help, as it only seems to talk about the keyboard layout, not the variant.

My X11 keyboard configuration is set properly, as the following :

    Option "XkbLayout" "fr,grec"
    Option "XkbModel" "pc105"
    Option "XkbVariant" "oss,"

But even when I try to set "KEYMAP=fr-oss" in /etc/vconsole.conf, it keeps using the default "fr" variant, not the "oss" one. Obviously the problem comes from the fact that the following instruction only returns "fr", but there's no "fr-oss" :

localectl list-keymaps | grep -i fr

whereas the following instruction returns "oss" :

localectl list-x11-keymap-variants fr

So the keymap I want to use seems to exist for X11, but not for console. I don't know if it's possible to copy it from somewhere... A package search gives no result for "fr-oss" in the official repos or in the AUR.

Thanx for any help !

Offline

#2 2017-05-14 23:00:15

Onf
Member
Registered: 2017-03-29
Posts: 13

Re: No appropriate keymap for the console

Hello,

"fr-oss" is a X specific keymap it does not exist for console mode.
http://idoric.free.fr/dotclear/index.ph … ais-fr-oss
http://hotline.asdrad.com/selectionner_ … ier_fr-oss

Offline

#3 2017-05-15 06:34:10

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: No appropriate keymap for the console

Oh ! OK, I hadn't seen it mentioned anywhere (and still haven't been able to find any information about it...)

So what is the solution ? I've read the wiki page called Extra keyboard keys in console, so I guess I should create a new custom keymap to remap the keys that I want to use, right ? I haven't been able to find a "fr-oss" keymap available for console, but since the "fr-oss" variant exists for more than ten years, I'm surprised that it hasn't been made available for console yet.

Has anyone already done something like that ? Or even just have remapped a few keys ? I'm just trying not to reinvent the wheel...

Offline

#4 2017-05-16 06:55:13

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: No appropriate keymap for the console

Well, since I have no answer, I've tried to customize my own keymap. But I'm facing two problems :
1. The wiki page says :

As a side note, it is worth noting that such a personal keymap is useful also to redefine the behaviour of keys already treated by the default keymap: when loaded with loadkeys, the directives in the default keymap will be replaced when they conflict with the new directives and conserved otherwise. This way, only changes to the keymap must be specified in the personal keymap.

But I have the impression that this is only for a temporary keymap : I can load my personal keymap using "loadkeys personal.map", and the changes I have made to the keymap will be applied, whereas all the undefined keys will be taken from the default keymap defined in /etc/vconsole.conf.
But how can I use a *permanent* personal keymap without remapping all the keys ? I mean : only one keymap can be defined in /etc/vconsole.conf, so if I use "KEYMAP=personal.map", how can I specify what the default keymap should be ? (for all the keys not remapped in personal.map)

2. In my personal.map file, I have the following code :

keycode 16 = +a +A acircumflex AE
keycode 24 = +o +O ocircumflex OE
compose 'A' 'E' to 'Æ'
compose 'O' 'E' to 'Œ'

It works perfectly for the "Æ" character, but the "Œ" is replaced by "¿"
Does anyone know why ? Why wouldn't it be possible to use "Œ" in the console if I can use "Æ" ?

Thanx for any help !

Last edited by LithoUser (2017-05-16 06:56:50)

Offline

#5 2017-05-16 07:29:13

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: No appropriate keymap for the console

LithoUser wrote:

But how can I use a *permanent* personal keymap without remapping all the keys ? I mean : only one keymap can be defined in /etc/vconsole.conf, so if I use "KEYMAP=personal.map", how can I specify what the default keymap should be ? (for all the keys not remapped in personal.map)

In your personal.map, you can use the `include` directive to include the base map. Here is an example where I adapt the swiss german layout to my needs:

# Base: Swiss-German
include "de_CH-latin1.map"

# Swap Escape/CapsLock
        keycode  1 = Caps_Lock
        keycode 58 = Escape

# Backspace/Delete with AltGr+j/k
altgr   keycode 36 = Delete
altgr   keycode 37 = Remove

You can then directly put your personal.map into /etc/vconsole.conf (assuming you've placed the file into /usr/share/kbd/keymaps/... — I would probably package it).

For your second question, I don't know, unfortunately.

Last edited by ayekat (2017-05-16 07:33:00)


pkgshackscfgblag

Offline

#6 2017-05-16 09:33:41

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: No appropriate keymap for the console

Right, I hadn't thought about including the default keymap. Thank you very much !

By the way, how do you include your map ? All the keymaps in my /usr/share/kbd/keymaps/ folder have a .map.gz extension, so the following line doesn't work, contrary to yours :

include "fr-latin9.map"

Also, I guess I should write the full path before it, right ? So that would be :

include "/usr/share/kbd/keymaps/i386/azerty/fr-latin9.map.gz"

As far as my second question is concerned, are you, for example (or anyone else ?), able to use the "Œ" character in the console ? (and I don't mean in a terminal under X, of course, but I do mean in a tty) I'm just trying to know if it's just not possible, or if it's a problem on my side.

Last edited by LithoUser (2017-05-16 09:54:46)

Offline

#7 2017-05-16 11:34:29

ayekat
Member
Registered: 2011-01-17
Posts: 1,589

Re: No appropriate keymap for the console

I think the kernel is able to figure out the fact that the map files are gzipped, so there is no need to put that extension (at least on my machine, it doesn't make a difference).

Where have you placed your keyboard map file? It appears that the files to include are searched relative to the location of the map file itself, so if you load it from any other location, you will need to specify the full path. Also, if you want to use /etc/vconsole.conf to set your keymap as default, it probably won't find your keymap if it was placed outside of /usr/share/kbd/keymaps/... (but I'm not 100% sure).

For your Œ issue, I don't know, unfortunately. To be honest, I haven't even managed to make Æ work here with the map file you provided (it gives me a fairly uniformative syntax error).

Last edited by ayekat (2017-05-16 11:38:47)


pkgshackscfgblag

Offline

#8 2017-05-16 16:31:04

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: No appropriate keymap for the console

I think the kernel is able to figure out the fact that the map files are gzipped

It seems so, indeed. This point is solved. Thank you !

I haven't even managed to make Æ work here with the map file you provided

I assume you mean the "fr-latin9" map ? In fact, I haven't been able to find any "Œ" character in ANY keymap provided by the "kbd" package (the /usr/share/kbd/keymaps/ folder). This is weird : it seems like the console accepts "Æ", but not "Œ" !

The reason why I asked this question was that except for browsing, I do all my stuff in the terminal (to write documents, scripts or dotfiles with vim, to manage my files, etc.) ; so I was thinking about not always starting X, but working directly in the console. Well it appears that, at least for writing, I can't do it in the console (yes, I'm a bit finicky about my documents wink And now I understand why the "fr-oss" keymap has never been adapted to be used in the console...

Could anyone try (whatever is your keymap) and confirm that it's just impossible to type an "Œ" character in the console ? Are there any other characters that we can't use there too ?

Last edited by LithoUser (2017-05-17 05:41:24)

Offline

#9 2017-05-17 12:33:00

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

Re: No appropriate keymap for the console

I can type Πin the virtual console.

$ cat /etc/vconsole.conf
KEYMAP=fr-latin9
FONT=eurlatgr

AltGr 152 gives Œ
AltGr 153 gives œ

I get also:
AltGr G gives Æ
AltGr g gives æ

without modifying any files.

'eurlatgr' is part of the 'kbd' package

Offline

#10 2017-05-18 05:24:42

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: No appropriate keymap for the console

Thanx for these informations.

Well, I've done just like you have : no personal keymap, and the same vconsole.conf file as yours. I've checked that the "eurlatgr" font exists in the /usr/local/share/kbd/consolefonts/ folder. And I have even reinstalled the kbd package, just in case... but it doesn't work. I encounter several problems :
1. I'm unable to type three-key combinations like your "AltGr 152" or "AltGr 153" : "AltGr 15" gives me a strange "'[" character (without the quotes, of course). "AltGr G" does work, however.
2. If I try to load a personal keymap based on "fr-latin9" and modified to add "Œ" and "œ", then the whole keymap is not loaded (even the accented characters from fr-latin9 like "é" or "à" are not displayed).

Maybe this is still due to a font problem : I'm not 100% sure that the "eurlatgr" font is loaded. I don't notice any difference between now and before with the default font (I don't know which one it is). Is there a way to check that ?

Last edited by LithoUser (2017-05-18 05:47:14)

Offline

#11 2017-05-18 08:55:44

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

Re: No appropriate keymap for the console

When I say 'AltGr 152' I mean keep AltGr pushed and type in 152 with the numpad block (of course VerNum is on), then release AltGr.
The AltGr key is just to the right of the Space long key.
I confirm that this work for me and gives a Πcharacter.

$ locate eurlatgr
/usr/share/kbd/consolefonts/README.eurlatgr                                                                                                                                                  
/usr/share/kbd/consolefonts/README.eurlatgr.mappings                                                                                                                                         
/usr/share/kbd/consolefonts/eurlatgr.psfu.gz

It is not in /usr/local/share like you mentioned in you post.

Offline

#12 2017-05-18 13:02:01

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: No appropriate keymap for the console

My mistake. I meant "/usr/share/kbd/consolefonts/" of course.
And I don't have a numpad (it's a laptop). So I'm out of luck here...
Thanx for your help anyway...

Offline

#13 2017-05-20 08:35:03

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

Re: No appropriate keymap for the console

I don't know what you want to do in virtual console, but depending on what program you use, a separate numpad block is not always necessary.
For example when editing a file with vim, you can enter UTF8 characters without using a numpad key block:
in edit mode, Ctrl v u hexadecimal code of the UTF8 character, then the space key to end the hexadecimal number and show the character.
(there are no spaces between the Ctrl v u hexcode keys pressed and case is not important).

Ctrl v u 152 space will show 'Π'

Can you tell what programs you want to use in console?

What I mentioned  in my preceding posts concerned typing characters in the bash shell prompt line.

Last edited by berbae (2017-05-20 08:36:28)

Offline

#14 2017-05-21 05:13:37

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: No appropriate keymap for the console

Yes, I use vim. I've tested Ctrl-v+u+152+Esc, and it works !

Thanx for the information, but what I wanted is the ability to reproduce the fr-oss keymap in the console, so this way is tooooo complicated for me.
Since there doesn't seem to be any solution, and since I'm able to use the fr-oss keymap under vim about five seconds after typing "startx", this is surely not a big deal...

Offline

#15 2017-05-21 11:55:28

fluxboxer
Member
Registered: 2012-12-02
Posts: 118

Re: No appropriate keymap for the console

1. sudo mkdir -p /usr/local/share/kbd/keymaps

2. Find your desired/corresponding/relevant map.gz file under /usr/share/kbd/keymaps/*

3. Copy it to /usr/local/share/kbd/keymaps/xxxx.map.gz

4. After decompressing edit/customise the xxx.map file with your editor as you like

5. Add this to your /etc/vconsole.conf:
KEYMAP=/usr/local/share/kbd/keymaps/xxxx.map

And now system upgrades will not change your customisation

Offline

#16 2017-05-22 04:25:14

LithoUser
Member
Registered: 2016-11-17
Posts: 139

Re: No appropriate keymap for the console

Thanx, I know how to do it, but as I said before, adding for example "compose 'O' 'E' to 'Œ'" breaks the personal keymap. It simply doesn't work, breaks the personal keymap, and defaults to the "fr" keymap instead.

Offline

#17 2017-05-22 07:58:07

fluxboxer
Member
Registered: 2012-12-02
Posts: 118

Re: No appropriate keymap for the console

Sorry for the noise.

Offline

Board footer

Powered by FluxBB