[rant] keeping policy in HAL

Peter Hutterer peter.hutterer at who-t.net
Sun Nov 30 22:08:25 PST 2008


On Mon, Dec 01, 2008 at 10:47:06AM +0500, Alexander E. Patrakov wrote:
> Peter Hutterer wrote:
> <adding the list back>
>> On Mon, Dec 01, 2008 at 09:55:03AM +0500, Alexander E. Patrakov wrote:
>>> Obvious problem: it is too late to set the keyboard layout in the   
>>> desktop environment. The user has to type the login and the password  
>>> into the display manager, and the keyboard layout has to be correct 
>>> at  this stage, too.
>>
>> obvious solution: let the display manager set the keyboard layout?
>> although others may disagree, for me the DM counts as part of the DE as well.
>
> Then, what DE does XDM count as a part of?

I was referring to DE as a concept, not as a specific implementation. It
counts as part of whatever you're running afterwards, may be gnome, kde,
xfce or my-happy-bunch-of-shellscripts.

> Also, currently, for unconfigured Xorg, such newly-added keyboard gets  
> the "us" layout. This is also a hard-coded policy, should we remove it?  
> In fact, I would consider any default other than "completely unusable  
> keyboard that doesn't produce any events" a policy. Reason: I want US  
> developers eat their own dogfood.

Well, if you don't map your keycodes to something, you won't be able to type
anything. "us" is traditionally the default and I'll let others have a
flamewar about that.

>> setxkbmap won't be able to set the layouts for future devices.
>
> Then something is bad. Suppose that, due to EMI, the kernel decided to  
> disconnect and reconnect the USB keyboard after setxkbmap has set the  
> layout for it. Who will reset the layout for it? XDM currently can't run  
> programs in response to such events. Should I report this as a bug?

Then you need a client in the background notifying you that a new device was
added, either prompting you to update the keymap, or runs it directly.

Cheers,
  Peter



More information about the xorg mailing list