Re: [PATCH] Fix autodetection of UNICODE keymap

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello Andrey,

Andrey Borzenkov <arvidjaar@xxxxxxx>:
> Original console_init from RH initscripts supports KEYTABLE variable
> which dynamically determines whether to load UNICODE keymap depending
> on current LANG value.
> 
> Scripts from 10i18n are more simplistic and assume the right keymap is
> statically defined in configuration files.

10i18n install script determines UTF-8 mode in basis of UNICODE
variable value or LANG value.  console_init doesn't have to perform any
auto-detection again, although it might be useful to check LANG again
instead of or additionally to checking UNICODE kernel cmdline arg.
Maybe I'll add sth like this.


> Add support for KEYTABLE to dynamically determine whether to install
> UNICODE or non-UNICODE keymap version. This should probably go into
> run-time 10i18n/console_init instead to be fully compatible.

-- CUT --

> +    KEYTABLE - base name for keyboard translation table; if UNICODE
> is
> +	true, Unicode version will be loaded. Overrides KEYMAP.

-- CUT --

> +    # KEYTABLE is a bit special - it defines base keymap name and
> UNICODE
> +    # determines whether non-UNICODE or UNICODE version is used
> +
> +    if [[ ${KEYTABLE} ]]; then
> +	if [[ ${UNICODE} == 1 ]]; then
> +	    [[ ${KEYTABLE} =~ .*\.uni.* ]] ||
> KEYTABLE=${KEYTABLE%.map*}.uni
> +	fi
> +
> +	KEYMAP=${KEYTABLE}
> +    fi
> +

What does *.uni* have to do with KEYMAP? Maybe I misunderstand it, but
we set up keyboard with two things:
  1) loadkeys to which we provide map from keymaps directory
     (where are no *.uni* files) and optionally '-u' which is UTF-8
     switch;
  2) kbd_mode to which we provide '-u' (UTF-8) or '-a' (ASCII).

*.uni* files are in unimaps directory. Those files are used by setfont.

Please explain me what is really the KEYTABLE variable and please check
out if you can achieve what you want with mappings in config file. Have
you read the README file?

If you have to resist with KEYTABLE, please publish archive with
configs where those vars are set up in your system, kbd dirs and init
scripts which set up those things.


Cheers,
Amadeusz Żołnowski

-- 
PGP key: 1024D/C284750D

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux Kernel]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux SCSI]

  Powered by Linux