Remapping the N900 arrow keys

Posted by berto on December 17, 2009

Here’s a tip for those of you using an N900 with an English keyboard.

For those who don’t know it, this is how arrow keys are arranged in (some) non-English layouts:

N900 keyboard

Compare to the English layout:

N900 keyboard

My N900 has an English keyboard, and I like it because I use the X terminal a lot so having separate keys for the arrows is good.

However I miss the accents (in particular ‘ and ~) as I usually write in Portuguese and Spanish, and using the additional on-screen keyboard is not that convenient for a Jabber conversation.

Fortunately, arrow keys can be re-mapped to add extra symbols by editing this file:

/usr/share/X11/xkb/symbols/nokia_vndr/rx-51

Just go to the end of the file and replace the ‘arrows_4btns‘ entry with this:


xkb_symbols "arrows_4btns" {
key <UP> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ Up, dead_circumflex ] };
key <LEFT> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ Left, dead_acute ] };
key <DOWN> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ Down, dead_tilde ] };
key <RGHT> { type[Group1] = "PC_FN_LEVEL2", symbols[Group1] = [ Right, dead_grave ] };
};

With this, Fn+Up/Down/Left/Right will produce a dead circumflex/tilde/acute accent/grave accent.

If you want these changes to take effect immediately just type ‘setxkbmap us‘.

Hope you find it useful.

Update 19 Dec 2009. Since some people have asked: of course even if you only write in English or another language that doesn’t need accents, you can still add useful symbols to the arrow keys such as ‘|‘, ‘<‘ or ‘>‘. You can use any of these keyboard layouts as an example. See also this thread and this other one.

Update 10 Jan 2010. The information on this post is now (in expanded form) in the Maemo wiki.

Trackbacks

Trackbacks are closed.

Comments

Comments are closed.

  1. Conny Thu, 17 Dec 2009 22:53:15 CEST

    Very nice tip :)

    Here are some for German Umlauts:
    xkb_symbols “arrows_4btns” {
    // standard arrows mapping
    // normal 2nd level must not be enumerated to allow text selection with Shift key
    key { type[Group1] = “PC_FN_LEVEL2″, symbols[Group1] = [ Up, udiaeresis ] };
    key { type[Group1] = “PC_FN_LEVEL2″, symbols[Group1] = [ Left, odiaeresis ] };
    key { type[Group1] = “PC_FN_LEVEL2″, symbols[Group1] = [ Down, adiaeresis ] };
    key { type[Group1] = “PC_FN_LEVEL2″, symbols[Group1] = [ Right, ssharp ] };
    };

  2. Webbie Fri, 18 Dec 2009 04:04:47 CEST

    I would like to recommend the following, which maps Home/End/Page Up/Page Down to their logical movement counterparts:

    partial hidden alphanumeric_keys
    xkb_symbols “arrows_4btns” {
    // standard arrows mapping
    // normal 2nd level must not be enumerated to allow text selection with Shift key
    key { type[Group1] = “PC_FN_LEVEL2″, symbols[Group1] = [ Up, Page_Up ] };
    key { type[Group1] = “PC_FN_LEVEL2″, symbols[Group1] = [ Left, Home ] };
    key { type[Group1] = “PC_FN_LEVEL2″, symbols[Group1] = [ Down, Page_Down ] };
    key { type[Group1] = “PC_FN_LEVEL2″, symbols[Group1] = [ Right, End ] };
    };

  3. Ernesto Fri, 18 Dec 2009 07:47:45 CEST

    Thank you for the tip! àáèéìíòóùú and so on…

  4. crown77 Fri, 18 Dec 2009 09:36:31 CEST

    wow this tip is what i waited for many thx crown77

  5. crown77 Fri, 18 Dec 2009 09:57:27 CEST

    Hi again sorry i was a little too far, could somebody give a hint how to activate the arrow keys in the german n900 device version so the up and down working without fn like in the usa and uk version? i would need this to play with the emus.

    thx again crown77

  6. Ismael Fri, 18 Dec 2009 10:34:30 CEST

    In the spanish version of n900 you can change the layout ot the keyboard to english in settings, text input, desing of phisical keyboard

  7. [...] This post was mentioned on Twitter by desk_stage, Knut. Knut said: Maemo.org: Remapping the N900 arrow keys http://url4.eu/x2Nh [...]

  8. speednut Fri, 18 Dec 2009 21:28:36 CEST

    Does anybody know the key name to find the next or previous white space? I’d like to map ctrl + (left | right) to be the next word or previous work, like keys “W” and “B” do while in vi command mode.

  9. berto Fri, 18 Dec 2009 22:06:02 CEST

    speednut: Ctrl+Left/Right works that way by default :)

  10. [...] E uma dica para quem tem, ou quer, um N900: como acentuar com o N900 com layout inglês. [...]

  11. speednut Sun, 20 Dec 2009 01:35:24 CEST

    @berto: On my US spec N900 with a doc loaded in Notes, the Ctrl+Left/Right does the same thing as Left/Right. Using the Ctrl key makes no difference.

    Can you share the default setting on yours?

  12. berto Mon, 21 Dec 2009 00:50:13 CEST

    speednut: I’ve just tried again right after reflashing with the notes app. It works fine, you can jump between words with Ctrl+Left/Right

  13. speednut Sun, 03 Jan 2010 08:34:09 CEST

    @berto: I pulled my head out of my bumm and it works as you’ve stated. Thanks for being patient with me. :-)

  14. [...] reklama smoku przed chwilą Jak przemapować klawisze w #N900 – blogs.igalia.com/…/12/17/remapping-the-n900… [...]

  15. Using the Shavian alphabet on the N900 « ᛏᚦ Sat, 09 Jan 2010 21:43:27 CEST

    [...] about ten minutes’ work, and as so often I’m rather impressed at how flexible Maemo is. This post was enormously [...]

  16. [...] about ten minutes’ work, and as so often I’m rather impressed at how flexible Maemo is. This post was enormously [...]

  17. Johannes Sun, 10 Jan 2010 02:33:44 CEST

    Thanks for the tip, this makes the N900 a lot more usable to me. Now there’s also a kind of firefox which runs on the N900, so I don’t think I need my iPhone anymore :)

  18. [...] é via xkb, alterando o mapeamento do teclado. O melhor link que achei sobre o assunto foi o blog The world won’t listen. No fundo, é preciso alterar o arquivo /usr/share/X11/xkb/symbols/nokia_vndr/rx-51, indicando as [...]

  19. Melanie Fri, 26 Mar 2010 22:22:48 CEST

    I have long searched for a solution here and now found. Thanks for this useful tip. I love my N900

  20. Gutschein Fri, 03 Sep 2010 12:54:57 CEST

    Nice Post. Thank you for this nice Tip

  21. Gutscheincode Sat, 18 Sep 2010 21:00:51 CEST

    Very nice post – It’s really helpful for my N900!
    I hope i get’s more usable in the future ;)

  22. Gutscheine Tue, 23 Nov 2010 19:26:13 CEST

    Hi again sorry i was a little too far, could somebody give a hint how to activate the arrow keys in the german n900 device version so the up and down working without fn like in the usa and uk version? i would need this to play with the emus.

  23. Konsekutivdolmetscher Wed, 15 Dec 2010 01:15:01 CEST

    This is a great blog. Thank you very much for the information of remapping the N900 arrow keys. This helped me very much with my mobile phone. Best regards

  24. Janislav Mon, 27 Dec 2010 02:21:32 CEST

    Thanks for that noce review that really helped me making an decision what to buy. It is great to have volunteers like you that that offer this service for free and post their results into the internet. thnaks a lot and go on!

  25. Marinimini Thu, 13 Jan 2011 15:03:10 CEST

    hello, i got an englisch keyboard, and i want to put up the umlauts on the arrow keys.

    but when type “/usr/share/X11/xkb/symbols/nokia_vndr/rx-51″ in the x-terminal, it says “/usr/share/X11/xkb/symbols/nokia_vndr/rx-51: Permission denied”

    WHY?

  26. berto Thu, 13 Jan 2011 16:24:12 CEST

    You have to EDIT that file with a text editor

  27. Marinimini Thu, 13 Jan 2011 18:59:07 CEST

    omg.. HOW?! can you put here a tutorial or something for stupid people?

  28. marinimini Thu, 13 Jan 2011 19:00:26 CEST

    i mean, i have no idea where to find the file, i know nothing…

  29. Asos Gutschein Thu, 17 Feb 2011 01:36:14 CEST

    Thanks for this Topic, but how can activate the arrow keys in the german n900 device version?

  30. Dan Mon, 28 Feb 2011 16:41:55 CEST

    Great tip, I really needed the help with my N900.

  31. Patrick Tue, 05 Apr 2011 11:29:15 CEST

    Very good article. But this did not work on german devices. If someone knows how to do this, it would be nice if he could post a short hint.

  32. Achim Sat, 27 Aug 2011 15:31:24 CEST

    Thank you for the great tip. Can anybody say how I get that working on a german N900? Greetings from germany! :)

  33. Bruce Fri, 02 Dec 2011 12:05:42 CEST

    Thx for the solution, I’m looking for such a great tip a longer time. N900 is now outdated, but I love it anyway.

  34. nikon scopes Wed, 21 Mar 2012 11:03:49 CEST

    Hi again sorry i was a little too far, could somebody give a hint how to activate the arrow keys in the german n900 device version so the up and down working without fn like in the usa and uk version?..

    nikon scopes