Bug 25655 - RFC: Model specific multi-layout support
Summary: RFC: Model specific multi-layout support
Status: RESOLVED FIXED
Alias: None
Product: xkeyboard-config
Classification: Unclassified
Component: General (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: xkb
QA Contact:
URL:
Whiteboard:
Keywords: patch
Depends on:
Blocks: 25507
  Show dependency treegraph
 
Reported: 2009-12-15 07:34 UTC by Rami Ylimaki
Modified: 2010-02-01 15:01 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Extend multi-layout configuration to depend on keyboard model. (3.35 KB, patch)
2009-12-16 04:37 UTC, Rami Ylimaki
Details | Splinter Review
Rename confs/scripts to indicate that a model column was added. (12.40 KB, patch)
2009-12-16 06:48 UTC, Rami Ylimaki
Details | Splinter Review
Combined patch. (12.89 KB, patch)
2010-01-29 02:38 UTC, Rami Ylimaki
Details | Splinter Review

Description Rami Ylimaki 2009-12-15 07:34:22 UTC
Just recently the support for Nokia's Maemo keyboards was added into upstream. We'd like to make minor modifications to the rules files and scripts to make it easy to support model parameter for 2nd, 3rd and 4th layouts of a multi-layout.

Most of the keyboard symbol files in xkeyboard-config are named after the layout. The Nokia symbol files are different because they are device specific. Each file contains all layouts for a specific keyboard. This has been done because it's a little bit easier to maintain keyboard specific files. This approach would require us to modify the rules for multilayouts slightly.

Currently there is a rules file called base.ml1_s.part, that contains a model specific column. We can easily add a rule for Maemo keyboards there:

nokiarx51 cz(qwerty) = nokia_vndr/rx-51(common)+nokia_vndr/rx-51(cz_qwerty)

However, to support 2nd, 3rd and 4th layouts in a multi-layout, you need to use base.l2_s.part, base.l3_s.part and base.l4_s.part files. These files don't contain any model column and the default rule in those files can't be used with Maemo keyboards. We'd like to rename the files and extend them to contain something like:

nokiarx51 cz(qwerty) = +nokia_vndr/rx-51(cz_qwerty):2
nokiarx51 *          = +nokia_vndr/rx-51(%l[2]%_v[2]):2
*         *          = +%l[2]%(v[2]):2

Would you accept a patch to implement these changes? The partial rule files would be modified and additionally there would be minor changes to the scripts to support the extra model column. It seems that such a change could be acceptable because there already exists the file base.ml1_s.part with model specific column.
Comment 1 Rami Ylimaki 2009-12-16 04:37:34 UTC
Created attachment 32119 [details] [review]
Extend multi-layout configuration to depend on keyboard model.

Here is a proposal for fixing this issue. If this kind of change is acceptable, there's only need to rename some configuration files and scripts to take into account the fact that a new model column has been added.
Comment 2 Rami Ylimaki 2009-12-16 06:48:34 UTC
Created attachment 32121 [details] [review]
Rename confs/scripts to indicate that a model column was added.

This is the second and last patch to fix this issue. This patch isn't absolutely needed, but it's best to apply it to avoid any confusion.
Comment 3 Rami Ylimaki 2010-01-18 03:16:59 UTC
Adding Sergey into CC. It's been a month since the patches were attached here so maybe they haven't been noticed. What's the correct way of getting them into upstream? Should I just be more patient or increase the priority for the bug? I added the patch keyword if that's going to help to make this noticed.
Comment 4 Sergey V. Udaltsov 2010-01-18 10:39:55 UTC
I am really sorry for overlooking this bug! That code makes sense to me. Unfortunately right now we're in pre-release freeze. But I'll commit the code once the release is out (i.e. tomorrow).
Comment 5 Sergey V. Udaltsov 2010-01-28 15:35:12 UTC
Rami, I have some questions.

First of all, the first patch is not really correct, because you already take models into consideration, so the filenames should be changed. I guess two patches should be combined, to keep the schema correct.

Also, I guess those files are missing in the 2nd patch:

base.ml2v2_s.part
base.ml3v3_s.part
base.ml4v4_s.part

Could you please fix that in your combined patch?

Thanks
Comment 6 Rami Ylimaki 2010-01-29 02:35:09 UTC
(In reply to comment #5)
> Rami, I have some questions.
> 
> First of all, the first patch is not really correct, because you already take
> models into consideration, so the filenames should be changed. I guess two
> patches should be combined, to keep the schema correct.

I'll provide a combined patch in the next message.

There is one problem though regarding renaming of files. When I change and rename files at the same time, git doesn't understand any more that the file is the same. Therefore we'll lose history for the renamed files. Git is only able to understand that the file has been changed and renamed if the changes are very minor. In this case all of the changes are too big so git will just delete the old files and create new files.

> Also, I guess those files are missing in the 2nd patch:
> 
> base.ml2v2_s.part
> base.ml3v3_s.part
> base.ml4v4_s.part
> 
> Could you please fix that in your combined patch?

Those files aren't missing because they are generated.

[sbox: ~/fdo/xkeyboard-config] > ls -la rules/*/base.ml?v?_s.part
dir: rules/*/base.ml?v?_s.part: No such file or directory
[sbox: ~/fdo/xkeyboard-config] > ./autogen.sh --prefix=/usr
[sbox: ~/fdo/xkeyboard-config] > make
[sbox: ~/fdo/xkeyboard-config] > ls -la rules/*/base.ml?v?_s.part
-rw-rw-r--  1 rjy rjy 1793 Jan 29 11:45 rules/compat/base.ml1v1_s.part
-rw-rw-r--  1 rjy rjy 1743 Jan 29 11:45 rules/compat/base.ml2v2_s.part
-rw-rw-r--  1 rjy rjy 1743 Jan 29 11:45 rules/compat/base.ml3v3_s.part
-rw-rw-r--  1 rjy rjy 1743 Jan 29 11:45 rules/compat/base.ml4v4_s.part
-rw-rw-r--  1 rjy rjy  200 Jan 29 11:45 rules/extras/base.ml1v1_s.part
-rw-rw-r--  1 rjy rjy  196 Jan 29 11:45 rules/extras/base.ml2v2_s.part
-rw-rw-r--  1 rjy rjy  196 Jan 29 11:45 rules/extras/base.ml3v3_s.part
-rw-rw-r--  1 rjy rjy  196 Jan 29 11:45 rules/extras/base.ml4v4_s.part

> Thanks

No problem.
Comment 7 Rami Ylimaki 2010-01-29 02:38:20 UTC
Created attachment 32893 [details] [review]
Combined patch.

This patch contains the previous two patches combined into single commit. The main problem here is that I don't know how to make git understand that the patch contains files that have been renamed and changed at the same time. We'll lose history for the renamed files.
Comment 8 Sergey V. Udaltsov 2010-02-01 15:01:56 UTC
I like your last patch. 
Committed, thanks!


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.