Bug#514464: Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2010-06-21 Thread Samuel Thibault
Samuel Thibault, le Sat 07 Feb 2009 23:04:17 +0100, a écrit :
> Cloning the bug as the lock led not showing up is an independant matter
> (which depends on kernel support actually).

Just for the record: this is currently in the mm tree in the

leds-route-kbd-leds-through-the-generic-leds-layer.patch

Samuel



--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20100622013051.ga14...@const.famille.thibault.fr



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-03-04 Thread Samuel Thibault
Hello,

Anton Zinoviev, le Thu 05 Feb 2009 14:58:46 +0200, a écrit :
> On Thu, Feb 05, 2009 at 12:39:08PM +0100, Samuel Thibault wrote:
> > 
> > I don't have the time to develop right now, but the idea would then be
> > to double the number of keymaps to 128, to have "capsed" versions of
> > each of the current keycode translations. 
> 
> A good idea. :)

Thanks for having implemented it!

Just an additional needed fixup: with the current svn, capitalization of
non-ascii letters does not work for two reasons:

- one needs to use locales to get locale-specific capitalization (e.g.
  in turkish, capitalization of i is not I but an I with dot above).
- for compatibility reasons, when chr() is given a value between 0 and
  0xff, it builds an 8bit char, not a unicode char.  The problem is that
  uc() then does not work in UTF-8 locales.  Using pack("U",...) always
  produces a unicode char.

See attached patch.

Samuel
Index: ckbcomp
===
--- ckbcomp (révision 57763)
+++ ckbcomp (copie de travail)
@@ -19,6 +19,7 @@
 
 use warnings 'all';
 use strict;
+use locale;
 
 my $debug_flag = 1;
 sub debug {
@@ -3149,7 +3150,7 @@
 #  warning "Forbidden Unicode \"U+$kernelkeysym\"\n";
return 'VoidSymbol';
} else {
-   if (chr($uni) =~ /\p{IsAlpha}/) {
+   if (pack("U", $uni) =~ /\p{IsAlpha}/) {
my $legacy = uni_to_legacy ($uni);
if ($legacy ne 'VoidSymbol') {
return '+'. $legacy;
@@ -3589,8 +3590,8 @@
for my $mask (0 .. 63) {
if ($capsvector[$mask] =~ /^(\+?)U\+([0-9a-fA-F]+)$/) {
my $v = hex ($2);
-   my $l = ord (lc (chr ($v)));
-   my $u = ord (uc (chr ($v)));
+   my $l = ord (lc (pack ("U", $v)));
+   my $u = ord (uc (pack ("U", $v)));
my $c = ($v == $l ? $u : $l);
$capsvector[$mask] = $1 ."U+". sprintf ("%04x", $c);
if ($v != $c && $v gt 0x7f) {


Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-07 Thread Samuel Thibault
clone 514212 -1
retitle -1 caps lock led does not show up
thanks

Cloning the bug as the lock led not showing up is an independant matter
(which depends on kernel support actually).

Samuel



-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Processed: Re: Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-07 Thread Debian Bug Tracking System
Processing commands for cont...@bugs.debian.org:

> clone 514212 -1
Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift 
lock
Bug 514212 cloned as bug 514464.

> retitle -1 caps lock led does not show up
Bug#514464: console-setup: on UTF-8 console, caps lock is turned into a shift 
lock
Changed Bug title to `caps lock led does not show up' from `console-setup: on 
UTF-8 console, caps lock is turned into a shift lock'.

> thanks
Stopping processing here.

Please contact me if you need assistance.

Debian bug tracking system administrator
(administrator, Debian Bugs database)


-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-05 Thread Anton Zinoviev
On Thu, Feb 05, 2009 at 12:39:08PM +0100, Samuel Thibault wrote:
> 
> I don't have the time to develop right now, but the idea would then be
> to double the number of keymaps to 128, to have "capsed" versions of
> each of the current keycode translations. 

A good idea. :)

Idealy some future version of loadkeys should automaticaly double the 
keysyms and convert CapsLock to CapsShift and in order to do this no 
keymap should use CapsShift directly.  In console-setup maybe it will be 
better to use CtrlL_Lock instead of CapsShift_Lock as CtrlL_Lock is 
supported by console-tools and by all kernels.

Anton Zinoviev




-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-05 Thread Samuel Thibault
Samuel Thibault, le Thu 05 Feb 2009 12:39:08 +0100, a écrit :
> Anton Zinoviev, le Thu 05 Feb 2009 13:28:07 +0200, a écrit :
> > I found the patch that needs to be applied and it is relatively simple.
> > 
> > http://lists.altlinux.org/pipermail/kbd/2008-April/000123.html
> 
> Thanks, that's mine :)

That was bug #452103, now closed, and indeed the patch is applied so you
can use it.

Samuel



--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-05 Thread Samuel Thibault
Anton Zinoviev, le Thu 05 Feb 2009 13:28:07 +0200, a écrit :
> I found the patch that needs to be applied and it is relatively simple.
> 
> http://lists.altlinux.org/pipermail/kbd/2008-April/000123.html

Thanks, that's mine :)

I don't have the time to develop right now, but the idea would then be
to double the number of keymaps to 128, to have "capsed" versions of
each of the current keycode translations.  And about the led issue, we
need to ask the kernel for an interface to be able to configure which
lock should drive which led.

Samuel



--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-05 Thread Anton Zinoviev
I found the patch that needs to be applied and it is relatively simple.

http://lists.altlinux.org/pipermail/kbd/2008-April/000123.html

Anton Zinoviev




-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-05 Thread Samuel Thibault
Anton Zinoviev, le Thu 05 Feb 2009 13:04:42 +0200, a écrit :
> On Thu, Feb 05, 2009 at 10:34:09AM +0100, Samuel Thibault wrote:
> > 
> > If the reason has been lost in history (the code dates back from at
> > least 2005) then we should probably apply the patch to fix the common
> > case, and let the real bug reappear and get fixed the proper way.
> 
> The reason is known - Caps_Lock works only for English letters.

More precisely, as described in the bug report, it works only for the
underlying 8bit charset, so in unicode it's latin1.

Samuel



--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-05 Thread Anton Zinoviev
On Thu, Feb 05, 2009 at 10:34:09AM +0100, Samuel Thibault wrote:
> 
> If the reason has been lost in history (the code dates back from at
> least 2005) then we should probably apply the patch to fix the common
> case, and let the real bug reappear and get fixed the proper way.

The reason is known - Caps_Lock works only for English letters.  I think 
there was some patch that fixed the problem but I don't know if it is 
applied in the Debian kernel.  I'll have to remember and check this.

Anton Zinoviev




-- 
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-05 Thread Samuel Thibault
Samuel Thibault, le Thu 05 Feb 2009 10:34:09 +0100, a écrit :
> Why is this hack needed?

Oh, that's probably due to 

http://bugzilla.kernel.org/show_bug.cgi?id=7746

Bummer, that's not an easy one.

Samuel



--
To UNSUBSCRIBE, email to debian-boot-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Bug#514212: console-setup: on UTF-8 console, caps lock is turned into a shift lock

2009-02-05 Thread Samuel Thibault
Package: console-setup
Version: 1.29
Severity: normal
Tags: patch

Hello,

While upgrading from console-data's keymaps to console-setup, my caps
lock became a shift lock, and the caps lock led doesn't work any more.

This is due to these few lines:
 
# A hack to work around a bug in the kernel/loadkeys
if (! $acm) {
$xkbsym_table{'Caps_Lock'} = 'Shift_Lock';
$xkbsym_table{'ISO_Lock'} = 'Shift_Lock';
}

which happen to be always executed as my system is UTF-8, just like all
future installed Debian systems.  Why is this hack needed?  We should
rather fix the bug where it belongs instead of introducing others on all
future installed systems... :)

If the reason has been lost in history (the code dates back from at
least 2005) then we should probably apply the patch to fix the common
case, and let the real bug reappear and get fixed the proper way.

Samuel

-- System Information:
Debian Release: 5.0
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.28 (SMP w/2 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages console-setup depends on:
ii  console-terminus  4.26-2.1   Fixed-width fonts for fast reading
ii  debconf [debconf-2.0] 1.5.24 Debian configuration management sy
ii  xkb-data  1.5-2  X Keyboard Extension (XKB) configu

Versions of packages console-setup recommends:
ii  kbd   1.14.1-4   Linux console font and keytable ut

Versions of packages console-setup suggests:
ii  lsb-base  3.2-20 Linux Standard Base 3.2 init scrip

-- debconf information:
* console-setup/variant: France
  console-setup/modelcode:
  console-setup/fontsize: 8
  console-setup/layoutcode: fr
  debian-installer/console-setup/title:
  console-setup/codesetcode: Lat15
  console-setup/dont_ask_layout:
* console-setup/altgr: Right Alt
* console-setup/ttys: /dev/tty[1-6]
* console-setup/codeset: # Latin1 and Latin5 - western Europe and Turkic 
languages
  console-setup/toggle: No toggling
* console-setup/fontface: VGA
* console-setup/fontsize-text: 8
* console-setup/compose: Right Logo key
  console-setup/switch: No temporary switch
* console-setup/charmap: UTF-8
  console-setup/optionscode: lv3:ralt_switch,compose:rwin
* console-setup/layout: France
  console-setup/variantcode:
* console-setup/model: Generic 105-key (Intl) PC
  console-setup/fontsize-fb: 8

-- 
Samuel
Be warned that typing \fBkillall \fIname\fP may not have the desired
effect on non-Linux systems, especially when done by a privileged user.
(From the killall manual page)
Index: Keyboard/ckbcomp
===
--- Keyboard/ckbcomp(révision 57453)
+++ Keyboard/ckbcomp(copie de travail)
@@ -2549,12 +2549,6 @@
 close ACM;
 }
 
-# A hack to work around a bug in the kernel/loadkeys
-if (! $acm) {
-$xkbsym_table{'Caps_Lock'} = 'Shift_Lock';
-$xkbsym_table{'ISO_Lock'} = 'Shift_Lock';
-}
-
 ### PARSING ###
 
 # Report a syntax error in $filename. $_[0] should describe what was