[Pkg-kbd-devel] Bug#420824: closed by Anton Zinoviev <zinoviev@debian.org> (Bug#420824: fixed in console-setup 1.16)

Colin Watson cjwatson at debian.org
Wed May 2 11:16:03 UTC 2007


On Wed, May 02, 2007 at 05:39:26AM +0000, Debian Bug Tracking System wrote:
>      - Use 'jp(latin)' instead of 'us' in the Latin mode of Japanese
>        keyboards.  Override the keyboard model if it was chosen by default
>        and the layout is Japanese or Brasilian.  Closes: #420824.

Hmm.

if [ $STATE -eq 0 ]; then
    exit 10
else
    # we don't do the following corrections during the state 2 or 3 of
    # the loop because if the user backs up and selects another layout
    # the keyboard model will be wrong.  We also want the combinations
    # Brasilian layout on Japanese keyboard and Japanese layout on
    # Brasilian keyboard to be possible.
    db_get console-setup/modelcode
    if [ "$RET" = "$default_model" ]; then
        if [ "$layout" = br ]; then
            model=abnt2
        elif [ "$layout" = jp ]; then
            model=jp106
        fi
        db_set console-setup/modelcode "$model"
    fi
fi

I'm not entirely sure I understand the reasoning for moving this out of
the state loop. I think possibly my original code for this should just
have made sure it wasn't run on backup from the layout question. Was
there some other case I missed?

Brazilian/Japanese combinations weren't something I'd thought of, but I
guess they both have <AB11> so fair enough. However, it seems weird that
if you select the br or jp layout by accident and then back up and
select something else then you still get left with the abnt2 or jp106
layout. I'm not sure this is desirable behaviour.

How about having the automatic model correction code above also set
default_model, so you can tell whether it was automatic correction or
manual selection? Then it seems like it would be safe to add something
like 'elif [ "$RET" = abnt2 ] || [ "$RET" = jp106 ]; then model=pc105',
since abnt2 and jp106 are essentially small variations on pc105.

I realise there are some warts in this relating to pc104 and such for US
keyboards (which seems to me to be incompletely handled at the moment
anyway), but does this make general sense?

Thanks,

-- 
Colin Watson                                       [cjwatson at debian.org]




More information about the Pkg-kbd-devel mailing list