Bug 18718

Summary: keycodes <-> symbols Cherry CyMotion Expert
Product: xkeyboard-config Reporter: Andreas Kilgus <kilgus>
Component: GeneralAssignee: xkb
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: medium CC: kilgus
Version: unspecifiedKeywords: NEEDINFO
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:

Description Andreas Kilgus 2008-11-26 14:10:53 UTC
For /usr/share/X11/xkb/symbols/inet:

// Cherry CyMotion Expert
partial alphanumeric_keys
xkb_symbols "cymexpert" {
    key <FK15><>{<----->[ XF86Mail<----><------>]<----->};
    key <FK16>  {       [ XF86Reload            ]       };
    key <I07>   {       [ XF86Forward           ]       };
    key <I08>   {       [ XF86Back              ]       };
    key <I0A>   {       [ XF86Copy              ]       };
    key <I0B><->{<----->[ XF86ScrollUp<><------>]<----->};
    key <I10>   {       [ XF86Back              ]       };
    key <I12>   {       [ XF86ScrollDown        ]       };
    key <I17>   {       [ XF86Cut               ]       };
    key <I18>   {       [ XF86Paste             ]       };
    key <I19>   {       [ XF86Forward           ]       };
    key <I1E>   {       [ XF86AudioRaiseVolume  ]       };
    key <I20>   {       [ XF86AudioMute         ]       };
    key <I21>   {       [ XF86Calculator        ]       };
    key <I22>   {       [ XF86AudioPlay, XF86AudioPause ] };
    key <I24>   {       [ XF86AudioStop                 ] };
    key <I25>   {       [ XF86AudioLowerVolume  ]       };
    key <I26>   {       [ XF86AudioMute         ]       };
    key <I2C>   {       [ XF86Book              ]       };
    key <I2E>   {       [ XF86AudioLowerVolume  ]       };
    key <I30>   {       [ XF86AudioRaiseVolume  ]       };
    key <I32><->{<----->[ XF86Finance<-><------>]<----->};
    key <I5F><->{<----->[ XF86PowerOff<><------>]<----->};
    key <I63><->{<----->[ XF86WakeUp<--><------>]<----->};
    key <I65><->{<----->[ XF86Search<--><------>]<----->};
    key <I66><->{<----->[ XF86HomePage<><------>]<----->};
    key <I67><->{<----->[ XF86AudioRewind<----->]<----->};
    key <I68><->{<----->[ XF86Eject<---><------>]<----->};
    key <I69>   {       [ XF86Forward           ]       };
    key <I6A>   {       [ XF86Back              ]       };
    key <I6B><->{<----->[ XF86MyComputer<------>]<----->};
    key <I6D><->{<----->[ XF86AudioMedia<------>]<----->};
    key <I71>   {       [ XF86Book              ]       };
    key <I72>   {       [ XF86Book              ]       };
    key <PRSC>  {       [ XF86Terminal          ]       };
    key <RWIN><>{<----->[ at<--><------><------>]<----->};
    key <XFER>  {       [ XF86Go                ]       };
};
Comment 1 Sergey V. Udaltsov 2008-11-26 15:16:37 UTC
Did you check Cherry CyMotion Master Express? It is almost identical, except for a couple of keys:
I5F (PowerOff)
I6B (MyComputer)
Could you please check that?
May be, I should add these keys to that keyboard, and make your model an "alias"?
Comment 2 Andreas Kilgus 2008-11-27 00:13:06 UTC
I tried several models to figure out which one was "closest to reality". The best one was in fact cherryblueb, the Master Express you mentioned, so I wrote down the keys that delivered no or a wrong - as far as I can judge that - symbol, copied the definition of cherryblueb and changed/added all keys that were wrong/missing. With the exception of XF86ScrollUp you can identify those keys in the list if you look at the lines with tabs instead of spaces.
Comment 3 Sergey V. Udaltsov 2008-11-27 01:20:44 UTC
> symbol, copied the definition of cherryblueb
You can just use "include" statement, you know;)

> and changed/added all keys that
> were wrong/missing. With the exception of XF86ScrollUp you can identify those
> keys in the list if you look at the lines with tabs instead of spaces.
Unfortunately in bugzilla it is not possible to distinguish space from tabs (since you pasted directly, not attached). Could you please list these keys explicitly? 

Comment 4 Andreas Kilgus 2008-11-27 01:41:05 UTC
> > symbol, copied the definition of cherryblueb
> You can just use "include" statement, you know;)

Well, my distro uses xkb 1.0, includes are rare in this version of rules/inet and I was unsure about the effect of duplicate definitions of keycodes and symbols - so to avoid problems I chose the conservative way ... :)

> Unfortunately in bugzilla it is not possible to distinguish space from tabs
> (since you pasted directly, not attached). Could you please list these keys
> explicitly? 

Strange - I can see

key <FK15><>{<----->[ XF86Mail<----><------>]<----->};

with visualized tabs in comparison to

key <FK16>  {       [ XF86Reload            ]       };

in my browser's presentation of this bug report. Anyway, these are the keycodes I changed/added:

FK15, I32, I5F, I63, I65, I66, I67, I68, I6B, I6D, RWIN.
Comment 5 Andreas Kilgus 2008-11-27 01:56:03 UTC
> rules/inet

symbols/inet, of course. *grmpf*

> in my browser's presentation of this bug report. Anyway, these are the
> keycodes I changed/added:
> 
> FK15, I32, I5F, I63, I65, I66, I67, I68, I6B, I6D, RWIN.

Having written this I remembered all at once that I replaced two keys of my CyMotion Expert with keys of a broken CyMotion Master Linux (LWIN shows a Tux again and RWIN is @). Therefore mapping RWIN to "@" is ok with my keyboard, but not "for the masses" - they might prefer "META_R" or whatever you think of as best assignment.
Comment 6 Sergey V. Udaltsov 2008-11-27 02:00:36 UTC
> Well, my distro uses xkb 1.0, includes are rare in this version of rules/inet
> and I was unsure about the effect of duplicate definitions of keycodes and
> symbols - so to avoid problems I chose the conservative way ... :)
Well, now you can fix it, cannot you?;)

> Strange - I can see
Sorry, I did not realize that <--> was for tabs:)

> FK15, I32, I5F, I63, I65, I66, I67, I68, I6B, I6D, RWIN.
Comparing to http://cgit.freedesktop.org/xkeyboard-config/tree/symbols/inet,
section "cherryblueb":

FK15 - right, to be added
I32 - already mapped to Finance
I5F - right, to be added
I63 - mapped to Standby. You want it as WakeUp. Is the difference substantial?
I65 - already mapped as Search
I66 - mapped as MyComputer. You want it as HomePage. Is it essential?
I67 - already mapped as AudioRewind
I68 - mapped as Stop. You want it as Reject. Again, is that critical?
I6B - right, to be added
I6D - already mapped as AudioMedia
Comment 7 Sergey V. Udaltsov 2008-11-27 02:01:16 UTC
ok, let's just leave RWIN aside...
Comment 8 Andreas Kilgus 2008-11-27 03:00:56 UTC
> > Well, my distro uses xkb 1.0, includes are rare in this version of
> > rules/inet and I was unsure about the effect of duplicate definitions of
> > keycodes and symbols - so to avoid problems I chose the conservative
> > way ... :)
> Well, now you can fix it, cannot you?;)

Yes, I can try to get it sorted. Since all this is the first time I deal with xkb things and since I spent quite some time to understand how it works - and to get my changes working - it might take some additional time until I touch my setup again ... ;)

> I63 - mapped to Standby. You want it as WakeUp. Is the difference
> substantial?

In my german version of the Expert the lettering of this key is "An" and "Aus" - "on" and "off". WakeUp is IMHO the logical counterpart to "on". But maybe it is more useful in practice to map it to Standby, even if that is not the functionality the lettering tells you to expect.

> I66 - mapped as MyComputer. You want it as HomePage. Is it essential?

This key (F11) shows some kind of folder symbol, the key to the left (F10) shows a computer:
http://www.cherry.de/deutsch/produkte/cymotion_master_expert_3.htm

Therefore I preferred the computer symbol as "MyComputer", was looking for a meaning for the folder symbol - and ended up at "HomePage" (which, at least in KDE3, by default opens one's home directory in Konqueror).

> I68 - mapped as Stop. You want it as Reject. Again, is that critical?

There is a distinct Stop-Button (keycode 164, <I24>, F6) on the keyboard, showing the symbol known from CD Players and the like. The lettering of I68 is a cross, so I propose to stay with "Eject".
Comment 9 Andreas Kilgus 2008-11-27 03:13:04 UTC
> > I68 - mapped as Stop. You want it as Reject. Again, is that critical?
> 
> There is a distinct Stop-Button (keycode 164, <I24>, F6) on the keyboard,
> showing the symbol known from CD Players and the like. The lettering of I68
> is a cross, so I propose to stay with "Eject".

On the other hand - if I consider the block of F1 to F4 as completely browser/navigation related, then indeed the following mapping is logical:

scan key   sym
234  <I07> XF86Forward
233  <I08> XF86Back
232  <I68> XF86Stop
231  <I67> XF86Reload (or XF86Refresh?)
Comment 10 Sergey V. Udaltsov 2008-11-27 03:30:08 UTC
> > I66 - mapped as MyComputer. You want it as HomePage. Is it essential?
> 
> This key (F11) shows some kind of folder symbol, the key to the left (F10)
> shows a computer:
> http://www.cherry.de/deutsch/produkte/cymotion_master_expert_3.htm
> 
> Therefore I preferred the computer symbol as "MyComputer", was looking for a
> meaning for the folder symbol - and ended up at "HomePage" (which, at least in
> KDE3, by default opens one's home directory in Konqueror).

OK, what I will do is create new model based on "cherryblueb", add 3 missing keys, remap I66. That should do.
Comment 11 Sergey V. Udaltsov 2008-11-27 03:44:09 UTC
Or may be I'll just add those 3 mappings to the existing model - and make your model an alias...
Comment 12 Andreas Kilgus 2008-11-27 07:09:18 UTC
Here's my choice for my setup:

xkb_symbols "cymexpert" {
    include "inet(cherryblueb)"
    key <FK15><>{<----->[ XF86Mail<----><------>]<----->};
    key <I5F><->{<----->[ XF86PowerOff<><------>]<----->};
    key <I63><->{<----->[ XF86WakeUp<--><------>]<----->};
    key <I66><->{<----->[ XF86HomePage<><------>]<----->};
    key <I67><->{<----->[ XF86Reload, XF86Refresh]<---->};
    key <I6B><->{<----->[ XF86MyComputer<------>]<----->};
    key <RWIN><>{<----->[ at<--><------><------>]<----->};
};
Comment 13 Sergey V. Udaltsov 2008-11-27 07:19:26 UTC
> xkb_symbols "cymexpert" {
>     include "inet(cherryblueb)"
>     key <FK15><>{<----->[ XF86Mail<----><------>]<----->};
>     key <I5F><->{<----->[ XF86PowerOff<><------>]<----->};
>     key <I63><->{<----->[ XF86WakeUp<--><------>]<----->};
As I said, I would keep it the way it is now (Standby)
>     key <I66><->{<----->[ XF86HomePage<><------>]<----->};
>     key <I67><->{<----->[ XF86Reload, XF86Refresh]<---->};
>     key <I6B><->{<----->[ XF86MyComputer<------>]<----->};

>     key <RWIN><>{<----->[ at<--><------><------>]<----->};
Your personal belongings;)
> };

Otherwise, I am happy with that code.

Comment 14 Sergey V. Udaltsov 2008-11-27 14:04:19 UTC
Committed! Just took freedom to change the name.
Comment 15 Andreas Kilgus 2008-11-27 23:02:07 UTC
> Committed! Just took freedom to change the name.

Thanks. The name you've chosen is the better one; updated my own setup accordingly to prevent future puzzlement of my silly brain. :-)

So thanks for your effort and the pleasant discussion - roger, over and out (until I buy another keyboard being neither in the list nor already completely supported *g*).

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.