maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers (https://talk.maemo.org/showthread.php?t=87511)

WAHID 2012-10-22 10:37

[ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Hi
I remap my n900 hardware keyboard layout for easy use to programming jobs.
I decision puclic that to other users use.
WARNING!
  1. Please read the main article on Remapping_keyboard
  2. Back up from your original rx-51 file and store in any place beside of nokia_vndr.
Features include:
  1. I Don't move any characte from original place. Just add other characters.
  2. F1-F12 on blue+shift+top row (F1= blue+shift+1 and ...)
  3. Tab on Fn+BackSpace
  4. Escape on Fn+ReTurn
  5. Page Up/Down on Fn+Up/Down
  6. Home/End on Fn+Left/Right
  7. Fn+shift+z/x/a/s is empty.
  8. other characters showed in below:
https://raw.github.com/vahit/N900-HK...ter/keymap.png
You can clone this projrct from that's github page.
But do not forget, send me a feedback ;)

vi_ 2012-10-22 11:00

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Check out this keymap, It will give you some clues on how to exploit the bugged z+x, j+k etc.

Also, your delete key will not work in osso-xterm.

Also, what is 'menu' symbol?

WAHID 2012-10-22 11:10

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
You're right. delete key will not work in terminal, and i can not found any solution for this problem.
I'm solved j+k bug with {} characters.
But i did not find any bug for z+x and a+s keys, i don't have other character to allocate to those.

WAHID 2012-10-23 09:51

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
ha ha!
I exploit Fn+Shift+J/K keys.
When i press and hold Fn with Shift key and press j/k typed {}.
But i should press Fn and drop it, press and hold Shift and press j! ok typed {.

vi_ 2012-10-23 11:27

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
http://wiki.maemo.org/N900_Hardware_Subsystems#Keyboard

demolition 2012-10-23 14:21

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Re: Shift + J and Shift + K, both giving )&: Interesting!

Has any cause been firmly decided on? Seems like a bit of a design cock up, if it really is as described in the above-linked wiki.

Looks like it could be very handy, as a means to avoid pressing Fn + Ctrl + screen-tap, to get a lot of characters.

How can Fn or Shift be cancelled? If you press Fn, Shift or both together, then decide you don't want to change kbd level, how does your kbd work? At the moment, to cancel either Shift or Fn, I just press one of the cursor, bksp or rtn keys, depending on what the cursor's doing.

Do these advanced layouts work with MicroB? Its Ctrl + Left or Right for tabbing can be both useful and highly irritating! Or, does MicroB still override?

@vi_ Thanks for heads up to your wiki page (and its link to main remapping page)

vi_ 2012-10-23 14:25

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
What do you mean? MicroB does not have tabs!

What does the 'menu' that you have assigned to the return key actually do?

HtheB 2012-10-23 15:11

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Quote:

Originally Posted by vi_ (Post 1284475)
What do you mean? MicroB does not have tabs!

What does the 'menu' that you have assigned to the return key actually do?

holding down the CTRL button and "RIGHT ARROW" is assigned as the "TAB" button on MicroB, (Ctrl+left arrow is assigned for "Shift+tab")

demolition 2012-10-23 15:24

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Quote:

Originally Posted by HtheB (Post 1284491)
holding down the CTRL button and "RIGHT ARROW" is assigned as the "TAB" button on MicroB, (Ctrl+left arrow is assigned for "Shift+tab")

Yeah, sorry - I wasn't very clear. My question is: would having a different kbd layout override this functionality, seeing as Tab is actually implemented? It's a good idea but sometimes annoying, especially in <textarea> elements, when it's not possible to use it like Ctrl + Left/Right on a PC, to skip to the beginning of words - BusyBox Power even has this sorted!

@WAHID
When using this custom layout, what happens to the symbol list (Fn + Ctrl)?

WAHID 2012-10-23 15:34

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Quote:

Originally Posted by demolition (Post 1284499)
@WAHID
When using this custom layout, what happens to the symbol list (Fn + Ctrl)?

That's work correctly so.

vi_ 2012-10-23 16:05

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
For the love of god, in all that is holy, can someone tell me what 'menu' key does?

WAHID 2012-10-23 17:37

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Quote:

Originally Posted by vi_ (Post 1284519)
For the love of god, in all that is holy, can someone tell me what 'menu' key does?

Oh, excuse me vi_. I don't see your question.
I borrowing that from this link: MaemoEmacs .
I using it in emacs.

ForeverYoung 2012-12-26 13:15

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Made my variant + russian layout with switching by Shift-Space (with combined cursor keys, while english layout has distinct).

At github

What do you think about:
1. Fix Fn-SH-h - dead_tilde - I get "~" only after second press
2. Something for Fn-SH-a, s, d, f, g, l?

Mentalist Traceur 2012-12-28 22:15

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Looks like the knowledge I added to that wiki page years ago has been helping people. Well, maybe not, most of the base knowledge was already there, I just clarified some stuff and added the section on multiple layouts (by means other than the stock ctrl+space toggle).

Mentalist Traceur 2012-12-28 22:20

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Quote:

Originally Posted by ForeverYoung (Post 1307895)
Made my variant + russian layout with switching by Shift-Space (with combined cursor keys, while english layout has distinct).

At github

What do you think about:
1. Fix Fn-SH-h - dead_tilde - I get "~" only after second press
2. Something for Fn-SH-a, s, d, f, g, l?

Characters with "dead_" in the front of the name are meant to do that - this is so that you can make letters with accents, by pressing it once, then pressing another character that can combine with it, like so: ñ ã ũ (These also have dead versions: ^, °, ˙, ¨, ", and honestly many others). If you don't need/want to make accented letters, you can change the name from "dead_tilde" to "tilde" in the rx-51 file. Or vice-versa if you want to swap other characters.

Mentalist Traceur 2012-12-28 22:58

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
About Delete not working in terminal: Use the key "KP_Delete" for the delete key mapping instead of whatever the more intuitive one was called (I already forgot the name of the other Delete key for xkb). That's the one I've been using for years on my N900 and it works perfectly, near as I can tell, everywhere.

Quote:

Originally Posted by WAHID (Post 1284356)
ha ha!
I exploit Fn+Shift+J/K keys.
When i press and hold Fn with Shift key and press j/k typed {}.
But i should press Fn and drop it, press and hold Shift and press j! ok typed {.

...this is the first time I've seen someone post a way to get around shift+fn+[j/k or z/x] printing both letters... You are awesome. Now I might need to rethink my layout, given this new information.

For the record, another way (just reiterating even though it's in the wiki, for those who don't read that part of it), if you find hitting both shift and fn simultaneously a lot more natural, is to simply leave one of those keys at the fourth level completely unmapped. Then it works to just print the one key, for either of the paired keys.

Quote:

Originally Posted by demolition (Post 1284473)
Do these advanced layouts work with MicroB? Its Ctrl + Left or Right for tabbing can be both useful and highly irritating! Or, does MicroB still override?

These key mappings are at the X level - they apply to everything that uses the X windowing system or whatever the proper term is - in other words, keyboard remappings and other modifications in the xkb directory apply everywhere on the N900. Every program that takes keyboard input. The only place this doesn't work for that I've seen is the framebuffer console. I don't know of any way to get to console other than at boot on the N900 at the moment though - so this only applies to things like boot-time recovery shells for the time being.

That said, I believe programs COULD override this behavior. Now, to answer your query, with a keymapping that doesn't alter ctrl+[arrow] specifically, MicroB still uses those as tab and shift-tab. Modifying the xkb behavior to allow ctrl+key combos would require you to also modify the file where the groups are defined. Then you can test if Micro-B still overrides... The N900 I'm on with at the moment is about to lose battery power, so I'm going to edit this post from another one as soon as I've re-found where the keygroup behaviors are defined.

mr_pingu 2012-12-28 23:16

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Thanks to the useful and detailed info on the wiki; I made my own keyboard layout. It's mostly based on vi_'s keymap but I added on the fourth-level: dead ` on F-key, dead ´ on G-key, dead ¨ on .:-key. Also I re-fixed the Euro-character he removed.

Still, it sucks that qt-application refuse to follow xkbmap, or partially. It doesn't follow all fourth-level keys, however it DOES follow the dead-characters I added on the above mentioned keys... Weird! =/

Edit:
According to Mentalist, some programms use KP_delete. to tackle this once and forever, I was thinking of some construction like this

[CODE
key <DEL> {[ KP_Delete ] };
key <KPDL> {[ Delete ] };
[/CODE]

This doesn't work as expected, unfortunately :(
Any ideas?

Mentalist Traceur 2012-12-29 00:04

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Quote:

Originally Posted by Mentalist Traceur (Post 1308629)
...Modifying the xkb behavior to allow ctrl+key combos would require you to also modify the file where the groups are defined. Then you can test if Micro-B still overrides... The N900 I'm on with at the moment is about to lose battery power, so I'm going to edit this post from another one as soon as I've re-found where the keygroup behaviors are defined.

Since a post was made after mine, I decided to add this as a new post instead of editing previous:

The various key level groupings are in /usr/share/X11/xkb/types/

There's many files in there, and they're all apparently read by xkb when looking for the key map 'type'. So if you want to experiment with a Ctrl+[key] key map type, you can just make your own test file in there... I THINK. There's more to how xkb does that then just those files, but it's been years since I've looked around there in-depth.

Mentalist Traceur 2012-12-29 00:10

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Quote:

Originally Posted by mr_pingu (Post 1308632)
Edit:
According to Mentalist, some programms use KP_delete. to tackle this once and forever, I was thinking of some construction like this

[CODE
key <DEL> {[ KP_Delete ] };
key <KPDL> {[ Delete ] };
[/CODE]

This doesn't work as expected, unfortunately :(
Any ideas?

Well, I'm not sure what you're trying to do, but I have the delete key on Fn+Backspace, and here is the line from my rx-51 file:

Code:

key <BKSP>        { [        BackSpace,        BackSpace,        KP_Delete,        Escape        ] };

mr_pingu 2012-12-29 00:20

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
I know that just works but from experience with the KP_enter issue (fixed by CSSU) is that certain programms failed to recognize KPEN and/or normal Return. A fix has be implemented to map KP_enter to Return and the other way round, no matter what enter was pressed it will always work. What I wanted to achieve is 100% compatibility ;)

For now I will go with the KP_Delete then ;)

Mentalist Traceur 2012-12-29 01:29

Re: [ANNOUNCE] NOKIA N900 Awesome Hardware Keyboard Layout for Programmers
 
Quote:

Originally Posted by Mentalist Traceur (Post 1308639)
Since a post was made after mine, I decided to add this as a new post instead of editing previous:

The various key level groupings are in /usr/share/X11/xkb/types/

There's many files in there, and they're all apparently read by xkb when looking for the key map 'type'. So if you want to experiment with a Ctrl+[key] key map type, you can just make your own test file in there... I THINK. There's more to how xkb does that then just those files, but it's been years since I've looked around there in-depth.

Making headway on this issue. Apparently just making a new file doesn't automatically work (not sure why) but modifying the nokia one in types/ did. So I just quickly copied the PC_FN_LEVEL2 button code as "PC_CTRL_LEVEL2", replaced LevelThree with Control, and tried it on the arrows. This HAS blocked the MicroB behavior of Ctrl-left/Ctrl-right being tab/shift-tab.

However, it's worth noting that, so far, this also seems to be blocking the more typical (and possibly desirable) behavior of Ctrl+Left and Ctrl+Right moving to the beginning/end of a single word, which I guess is a hildon-level thing or something.

EDIT: To clarify, to block that default behavior, you need to map it to something other than that arrow key, but then Ctrl+arrow will not behave like you'd expect (unless you expect it to act like a different key). Furthermore, if you map Ctrl+arrow to Home/End keys, instead of behaving properly, in MicroB it works like PageUp/PageDown keys instead (but worked right in Terminal and Notes). If you leave the value for the Ctrl+arrow mappings blank, then it completely ignores that keypress combination. I'll fiddle some more sometime, but that's what I've gotten so far.


All times are GMT. The time now is 15:51.

vBulletin® Version 3.8.8