Reply
Thread Tools
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#1
Hi,

I'm playing with my N900 to enable multiple keyboard layouts. I'm using the Russian layout as the second one as it's non-qwerty. I did

Code:
setxkbmap -layout pl,ru
setxkbmap -option grp:ctrl_shift_toggle
But pressing both keys doesn't do anything.

Interestingly, after issuing
Code:
setxkbmap -layout ru
the letter keys work as if no command were issued, but left arrow outputs "б" and the up arrow - a dot.

And besides - is it possible to add layouts, best in separate files, to be used by xkb on N900? And is there a polytonic Greek layout for N900?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following 4 Users Say Thank You to marmistrz For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#2
Well, I played once again and noticed that pressing both keys does in fact change the layout.

The problem is that even if I'm using the Russian layout, I'm unable to enter Russian characters. Pressing a gives a, etc. Only the right arrow gives the Russian "b". How can I enter Russian characters when using the Russian xkb layout? Why does the layout doesn't allow me to enter cyrillic characters?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following 4 Users Say Thank You to marmistrz For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#3
Bump! (10 chars)
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following User Says Thank You to marmistrz For This Useful Post:
Posts: 2,225 | Thanked: 3,822 times | Joined on Jun 2010 @ Florida
#4
Originally Posted by marmistrz View Post
Hi,

I'm playing with my N900 to enable multiple keyboard layouts. I'm using the Russian layout as the second one as it's non-qwerty. I did

Code:
setxkbmap -layout pl,ru
setxkbmap -option grp:ctrl_shift_toggle
But pressing both keys doesn't do anything.
I haven't tried that route in a long time: I settled on mapping a key to ISO_Next_Group (and then eventually another key to ISO_Prev_Group). For example, in the /usr/share/X11/xkb/symbols/nokia_vndr/rx-51 file, my mapping for left shift looks like this:

Code:
key <LFSH> {
    type[Group1]= "FOUR_LEVEL",
    symbols[Group1] = [ Shift_L, Shift_L, ISO_Next_Group, ISO_Prev_Group]
};
(Note that the fourth level is rather useless because there's no way I have found to get the shift key to be pressed while already shifted and fn-ed.)

..and my mapping for my control key looks like this:

Code:
key <LCTL> {
    type[Group1]= "FOUR_LEVEL",
    symbols[Group1] = [ Control_L, Control_L, ISO_Prev_Group, ISO_First_Group]
};
(Again, I mostly don't use the fourth level. Note that I don't even bother having a way to get to the virtual special-symbol keyboard, since that breaks when you have multiple layouts the way I do anyway.)

Originally Posted by marmistrz View Post
Interestingly, after issuing
Code:
setxkbmap -layout ru
s
the letter keys work as if no command were issued, but left arrow outputs "б" and the up arrow - a dot.
-and-
Originally Posted by marmistrz View Post
Well, I played once again and noticed that pressing both keys does in fact change the layout.

The problem is that even if I'm using the Russian layout, I'm unable to enter Russian characters. Pressing a gives a, etc. Only the right arrow gives the Russian "b". How can I enter Russian characters when using the Russian xkb layout? Why does the layout doesn't allow me to enter cyrillic characters?
I'm not really sure off the top of my head what situation you got yourself into as far as the layouts go, which could explain this, but as a reminder: The stock Russian layout is coded as an 8-level layout: it's got this wierd coupling with the Ctrl+Space layout switch that Nokia coded into Hildon, where the first four levels are basically an English layout, and the upper four are the Russian one. Might be relevant? For my Russian layout, I completely stripped out the bottom four levels, made it just a four-level layout of just cyrillic characters, and that works fine for me.

Originally Posted by marmistrz View Post
And besides - is it possible to add layouts, best in separate files, to be used by xkb on N900?
Yes. I don't have a ready-made example for you, but it's something I've been meaning to do on my N900s (because I've gotten to the point where I'm just adding new layouts to the rx-51 file, which is just clumsy and prone to getting clobbered during updates). I'll come back to this and let you know when I've had a chance to get around to doing this on my own.

In the meantime, here's something you may find useful. I set up my layouts to load on boot by changing the /app/osso/inputmethod/int_kb_layout key in gconf to "us,nokia_vndr/rx-51(ru),nokia_vndr/rx-51(oth)"

Note a few things:
1. the first layout is also inside the nokia_vndr/rx-51 file. For some reason that I don't currently remember the explanation to (if I ever found that explanation at all, but I think I did or at least started to and just forgot it), the first layout is assumed to be in that file.
2. All other layouts are specified, seemingly, as relative paths to the layout file from the symbols directory, with the layout names specified in parentheses. So in the above example, I am adding the us, ru, and oth layouts from my rx-51 file.
3. The 'oth' layout is one I completely added from scratch, mostly has a bunch of other keys I wanted access to but which didn't neatly go into the other two layouts. The 'ru' layout is heavily modded, to a normal four-level layout instead of the stock 8-level coupled-to-Hildon's-Ctrl+Space-combo one, as aforementioned.

So you should be able to have other layouts pulled from any other files. I personally intend on making a personal folder inside the symbols folder (or some sub-folder) and putting my layout files inside that.

Originally Posted by marmistrz View Post
And is there a polytonic Greek layout for N900?
Not that I am aware of. I started making a layout with a bunch of Greek symbols, but I am not fluent in Greek nor familiar with the standard keyboard layout(s?) for Greek keyboards. I just wanted the characters for the usecase of writing out mathematical equations.

The XKB symbol names are, for example: "Greek_theta" (lowercase) / "Greek_THETA" (uppercase). So you can use that information as a starting point to make your own.

P.S. I find it infinitely frustrating just how much of an acrane fractal of unexplained-ness the xkb system is.
__________________
If you want to donate in support of anything that I do, you can do so with either of these options:
PayPal | Bitcoin: 1J4XG2z97iFEKNZXThHdFHq6AeyWEHs8BJ | [Will add other donation options eventually]
 

The Following 2 Users Say Thank You to Mentalist Traceur For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#5
Mentalist Traceur: Have you found a way to add kbd layouts as separate files?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 

The Following User Says Thank You to marmistrz For This Useful Post:
ekze's Avatar
Posts: 115 | Thanked: 95 times | Joined on Oct 2011 @ Sankt-Peterburg, Russia
#6
N900's default for changing keyboard layout is ctrl+space. But, you cannot enter non-latin characters when your hardware layout is set to United States for example for some reason: https://bugs.maemo.org/show_bug.cgi?id=2501 . You need to change your hardware layout to Russian and add English (US) inside as a second layout and switch between them using ctrl+tab. It is possible to do that using default settings GUI.
The problem is that Russian N900 hardware keyboard layout is pretty weird, as it doesn't have up and down buttons (you have to use fn+left and fn+right instead): https://upload.wikimedia.org/wikiped...kia_N900-1.jpg
The solution for this is to have multiple hardware keyboard layouts and switch between them, instead of just changing layout within one hardware layout (English on Russian hardware layout is acceptable, but no up-down cursor keys makes it annoying), and you cannot at all enter cyrillic in United States hardware layout.

Here you can find an applet that adds itself into status bar allowing you to change hardware keyboard layout without going into settings every time: http://talk.maemo.org/showthread.php?t=38752

Hope this helps!

And to answer your last question in the first post, are you aware of this package: http://maemo.org/downloads/product/Maemo5/ukeyboard/ it seems to add more layouts to n900.
 

The Following 2 Users Say Thank You to ekze For This Useful Post:
Posts: 3,328 | Thanked: 4,476 times | Joined on May 2011 @ Poland
#7
Thanks! I'm at most interested in adding the layouts in separate files. I'm just about to add a phonetic Russian layout (а in place of a, в in place of w, б in place of b, г in place of g, etc.) and a sensible Greek layout. And I'd rather had it backed up or, even better, packaged.

Would it work (I'd rather not reflash ) if I created the file /usr/share/X11/xkb/symbols/nokia_vndr/my-layouts with the content

Code:
partial alphanumeric_keys
xkb_symbols "my-layout" {
    name[Group1] = "Russian phonetic";
    
// And here define the keyboard row by row
//1st row
key <AD01>    { [    Cyrillic_ya,        Cyrillic_YA,        1,        1        ] };
// and so on
};
Or is the folder nokia_vndr limited to the three files only?
__________________
If you want to support my work, you can donate by PayPal or Flattr

Projects no longer actively developed: here
 
Reply


 
Forum Jump


All times are GMT. The time now is 14:47.