On Tue, 2012-07-24 at 11:45 -0400, Will Woods wrote: > On Fri, 2012-07-20 at 11:31 +0200, Vratislav Podzimek wrote: > > As it was suggested in the discussion here on the devel list, we could > > use the systemd-localed DBus service [1] to set keyboard layouts. I've > > looked at it and tried some tests and here are the results: > > > > 1.) The main problem is, that this service allows to set only one > > keyboard layout and is therefore not usable for us for setting multiple > > X11 keyboard layouts. > > Can you explain this a bit more (mostly for us poor ignorant keymap=us > users)? Some questions: > > What do you mean by "multiple keyboard layouts"? Multiple keyboards, or > keymap switching (using a hotkey or something)? "keyboard layout" == keymap X server lets you use multiple keyboard layouts (keymaps) and switch between them with a hotkey (Alt+Shift, Ctrl+CapsLock, ...). Look to the "Region and Language" -> Layouts screen of the gnome-control-center or its equivalent in the environment you are using for more details. This is very handy when you are not using only English. I, for example, use two keyboard layouts -- Czech (qwerty) and English. > > Do people use this in anaconda? Hard to say because we didn't give them a chance in the old UI. But I'm sure people would (and will) use it, because they can, for example, have passwords containing "local characters". And since we are going to let people enter their names (when setting up user accounts), I'm quite sure many of them will want to enter their real name, not any transcripted version. > > How do you switch keyboard layouts in a normal system? (iBus?) This unfortunately depends on the environment, you are using. X server itself can handle layout switching, but some desktop environments provide their own tools for it. iBus lets you switch input method, that is something different -- basically you type characters based on your keyboard layout and iBus "translate" them to the native characters (follow [1] to try it yourself). However, to achieve this, iBus sometimes switch keyboard layouts too. > > If normal systems use iBus for keymap switching, why can't we do that in > anaconda? As mentioned above, iBus handles input method switching and I'm working on getting it to anaconda. Problem is, it uses gnome-panel, gnome-settings-daemon and dconf. I'm now testing if/how it works without these things. > > If this is a shortcoming of launchd, can we ask them about adding > support for it? I think X layouts switching shouldn't be handled by systemd, because it's user-specific and, as mentioned above, many desktop environments handle this with their own tools. > > > 2.) While it has a method for setting the virtual console keyboard > > layout too, it provides us the same functionality as loadkeys command. I > > see no reason for replacing loadkeys calling with DBus method > > invocations. Once rhbz#837292 [2] gets resolved it would allow us to use > > more keyboard layouts in the console, but for now I don't see any reason > > to use it. > > It would let us remove most of keyboard.py and use existing (and > up-to-date!) system services instead - less code for us to maintain, and > the DBus API is more likely to stay stable. We now use libxklavier that is up-to-date and reads the configuration directly from X server. While systemd-localed could provide a DBus API to setup multiple layouts and switching (which I doubt it will, cause it would be usable only in anaconda), we would still need the list of all available layouts grouped by languages and probably some more things. I'm affraid that the code using such complex DBus API would not be shorter than what we have now using libxklavier. > > I mean, that's the new game, right? Whoever removes the most code wins! > (And you all have a lot of catching up to do.. :P) May be, but not by removing functionality ;) -- Vratislav Podzimek Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic _______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list