maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   Switching sections of keyboards in MeeGo and phone numbers layout (Nokia N9) (https://talk.maemo.org/showthread.php?t=80032)

eccenux 2011-11-16 03:14

Switching sections of keyboards in MeeGo and phone numbers layout (Nokia N9)
 
3 Attachment(s)
Preface
So you can make many layouts and switch with swipe... You can, but do you have to? The answer is no - you can switch with a button within a single layout.

The switch button is a button with a special action (action="switch"). It can have any label but in default keyboards labels indicate in which section you are in (1/2 stands for 1st of two sections).

Attached Polish keyboard layout with phone-like numerics
Anyway I'm attaching a ready to use keyboard layout. It's based on Polish layout, but you can easily change it be anything. The layouts should be placed in `/home/user/.config/meego-keyboard/layouts/`.

Note that after you download attached files you need to remove the `.txt` extension.

Also note that the layout will be available after restarting your phone.

What the files are (for those willing)
  • pl_phone.xml - this is the main file and is copy of pl.xml. Note that you can use any main layout you like (use the once you find in `/usr/share/meegotouch/virtual-keyboard/layouts/` or any from e.g. mesinput.com). What you should change is:
    • the title attribute (I use "Polski telefoniczny")
    • the catalog attribute (I use "pl" as it is for Polish language)
    • the language attribute in most cases should be the same as catalog
    • import tags at the bottom should include one or more files with additional section. Note that you can use existing files in `/usr/share/meegotouch/virtual-keyboard/layouts/` just by giving their name (not whole path). Do note that your layout will not work if you just import everything - sections in layouts must have unique id attributes.
  • phone_symbols.xml - this is section0 and section1 of my layout
  • symbols-38-34.xml - this is a copy of original symbols sections with their ids changed to section2 and section3.

So how does action="switch" work? From what I've tested it just cycles from symbols0 to symbols1 (current +1) and then back to symbols0 after there are no more symbols sections.

Note that you can put anything in symbols sections it can be a qwerty keyboard, Dvorak, your favorite simlies or whatever. You just need to remember to add the switch action so you will not be caught in a dead end.

Have fun :)


All times are GMT. The time now is 17:00.

vBulletin® Version 3.8.8