Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Support for f(x)tec Pro1X #21

Closed
dstango opened this issue Aug 27, 2022 · 20 comments
Closed

Add Support for f(x)tec Pro1X #21

dstango opened this issue Aug 27, 2022 · 20 comments

Comments

@dstango
Copy link

dstango commented Aug 27, 2022

I tried finquerty with a German layout on the new Pro1X, but the key codes seem to have changed compared to the Pro1: all letters are moved to the right - pressing k results in l, etc.

Is there a way tp fix it? Is this project still active?

Thanks!

@xhajt03
Copy link

xhajt03 commented Sep 6, 2022

I discovered something similar. I moved one step further and even created two layouts I use on my Pro1x (Czech and US for the physical QWERTY version) - see
pro1x_layouts.zip. I sent them to the e-mail of FinQwerty author, but got no response from him so far. In fact, the zip contains two alternative versions of those layouts - the "_spc" versions include additional changes (support for additional functionality attached to specific key kombinations) found in FxQwerty created by user Slion (apparently a fork of FinQwerty which is however missing support for other languages and thus not very useful for me). I believe that there may be some more useful functionality (e.g. direct invocation of generic applications like contacts, calls, messages, etc., which might be added as combinations with the special "FxTec" key), but that may be added later as well.

While working on my changes, I tried to make the behaviour of the Czech layout as close to the PC keyboard layout for Czech as I could (since from HW layout point of view the differences are very small with Pro1x). The original yellow characters depicted on the QWERTY version of the HW keyboard are always available using the "Fn" key (i.e. the yelow up-right arrow) and I also added possibility of emitting the original white character displayed on the HW keyboard (usually different especially for keys with interpunction, etc.) using Fn+Shift combination (otherwise unused). I also provided support for characters mapped to AltGr+letter on the regular PC keyboard layout (for Czech) using Fn+letter. I believe that you might be able to create a German layout based on this (and I'm willing to help you with that if necessary). Obviously, the more important point is getting some feedback from the author or somebody else able to include these layouts into a new version of FinQwerty. Alternatively, we might try to ask user Slion or somebody else able to compile the needed Android package from the sources.

@xhajt03
Copy link

xhajt03 commented Sep 6, 2022

Sorry, a minor follow-up - looking at the issue raised to FxQwerty, it seems that the "_spc" versions might need to be modified slightly to cover for that issue. However, I don't know if that is really necessary, because FxQwerty .kcm files are constructed as "full layouts" (according to the Android specification) whereas FinQwerty .kcm files seem to be created as "overlay layouts" thus probably keeping the default functionality for all combinations not explicitly specified in the respective .kcm file. Someone more knowledgeable might tell us, or we could find out by getting the new build from someone and testing it.

BTW, to be clear - I would either decide for using the "_spc" versions, or the other, not both, because it makes no sense to have multiple almost identical layouts in the list of available keyboards in settings.

@dstango
Copy link
Author

dstango commented Sep 6, 2022

Thanks for sharing!
From looking around in the project it doesn't seem to be active.
Is it possible to use your files without creating a new build of the project?

There is one more active fork that added support for the unihertz titan: https://github.com/fjdrjr/titanqwerty

If we need to rebuild the project we also could create a fork, and see if we can build it ourselves to get an apk. Yet: I haven't done that for any android app so far.

@xhajt03
Copy link

xhajt03 commented Sep 6, 2022

Anssi Hannula (author of FinQwerty) responded to my e-mail message earlier today and provided me with a test build. It doesn't work as expected yet, but I hope that we should be able to solve it (and that should allow adding the German layout for Pro1x as well).

@dstango
Copy link
Author

dstango commented Sep 7, 2022

that's good to hear! Thanks!

@xhajt03
Copy link

xhajt03 commented Sep 8, 2022

We're getting closer to resolution of issues with my first draft layouts for Pro1x (some of them were simply typos, there's just one more fundamental issue, but I'm convinced that we'll sort it out as well). The only thing complicating it a bit is the fact that Anssi doesn't have a Pro1x device (yet). I believe that it would be useful to get layouts for other languages (like German, which is of your interest as far as I understand it), but we'd probably need your involvement in this (I know German, but have no experience with German layout on PC keyboards, which is not the best start for proposing and testing appropriate layout for Pro1x). Are you willing to work on this (it isn't that much effort and not that difficult - my starting point was no knowledge of the .kcm files and their structure and I managed to prepare my proposal without any consultancy with more knowledgeable people). One more question which might help especially with testing - which of the variants of the Pro1x physical keyboard do you have, QWERTY, or QWERTZ? I have QWERTY; testing by somebody having the QWERTZ variant would be very useful in order to make sure that layouts for this variant are properly working as well.

@dstango
Copy link
Author

dstango commented Sep 8, 2022

I have a German QWERTZ-Layout, and I can check out the .kcm files.

It is close to this layout:
https://community.fxtec.com/uploads/monthly_2020_03/1416531738_FXQWERTZFIN1.0.png.1090240f65973f215995943f9511ef6a.png

comparing it to the qwerty-layout on this page the problem becomes quite obvious:
https://www.fxtec.com/pro1x

the German QWERTZ-layout moves all the regular letters one button to the left, to make space for ÄÖÜ, etc.
That's what results in an offset by 1 key ...

Do you know how the QWERTZ-layout was for the Pro1? Was it more akin to the QWERTY-layout with the Q next to the TAB-key?

I just peeked into your kcm-files. Doesn't seem too complicated. Looks like you only needed to define "deltas" for the keys you're interested in, and each key is either identified by the single-character for each letter of the alphabet on the QWERTY-key, or a descriptive identifier for special characters.

@dstango
Copy link
Author

dstango commented Sep 8, 2022

The best way would be to have a "sideloading"-mechanism, that doesn't require the app to be rebuild, but the app having an option to choose "use this file as keyboard layout". That would be great for testing, as makes the round-trips of defining and trying it out easy. Maybe the app already has that -- do you know about it?

@xhajt03
Copy link

xhajt03 commented Sep 8, 2022

This "sideloading" has already been discussed somewhere (possibly in another thread / issue here?) and the outcome of the discussion was that it isn't possible, because Android requires the layouts to be compiled into the application (in resources, i.e. without possibility to change the content dynamically).

@dstango
Copy link
Author

dstango commented Sep 8, 2022

That's unfortunate, but I understand. Thank you!
I would dream to have an on-screen-simulation of the keyboard on my PC then :-P ...

@xhajt03
Copy link

xhajt03 commented Sep 8, 2022

I have a German QWERTZ-Layout, and I can check out the .kcm files.

It is close to this layout: https://community.fxtec.com/uploads/monthly_2020_03/1416531738_FXQWERTZFIN1.0.png.1090240f65973f215995943f9511ef6a.png

I can imagine the QWERTZ layout of Pro1x from physical point of view, because I assume that it isn't different from my QWERTY apart from Z<->Y and differences on the numeric, interpunction and symbol keys. The referenced picture shows a QWERTY version with a modified layout. What we need:

  • The original descriptions of the stock QWERTZ of Pro1x - this is necessary in order to keep the yellow characters accessible using the Fn combination while remapping the Shift combination to the behaviour expected for the usual layout for the particular language (and preferably also keep the original white characters accessible using Shift+Fn combination).
  • The expected layout of the German keyboard (including things like characters accessible using AltGr combinations on a regular PC keyboard layout for German).
  • Testing of the created layouts, because some keys may need a different identifier in .kcm files for the physical QWERTZ version.

Neither of these things is solved by the referenced picture.

comparing it to the qwerty-layout on this page the problem becomes quite obvious: https://www.fxtec.com/pro1x

Funnily enough, the images on this web page related to Pro1x show the layout of the Pro1 model. ;-)

the German QWERTZ-layout moves all the regular letters one button to the left, to make space for ÄÖÜ, etc. That's what results in an offset by 1 key ...

No, this is the difference between Pro1 and Pro1x, not between QWERTZ and QWERTY versions.

Do you know how the QWERTZ-layout was for the Pro1? Was it more akin to the QWERTY-layout with the Q next to the TAB-key?

You can see the stock layouts of Pro1 keyboards on the FinQwerty page.

I just peeked into your kcm-files. Doesn't seem too complicated. Looks like you only needed to define "deltas" for the keys you're interested in, and each key is either identified by the single-character for each letter of the alphabet on the QWERTY-key, or a descriptive identifier for special characters.

Indeed. The only somewhat more complicated thing is that you need to find the respective Unicode number characters above ASCII 127 (or 7f in hexadecimal notation), but tools like programmer editors show you Unicode numbers of typed characters and there are web pages with the Unicode definitions which may be needed for looking up special things like the so-called 'combining characters', i.e. the accents not used by itself but rather modifying the following character (e.g. diaeresis aka the German umlaut).

@dstango
Copy link
Author

dstango commented Sep 8, 2022

I'm confused:
https://android.onse.fi/finqwerty/#pro1
shows exactly the off-by-one-key between QWERTY and QUERTZ ... and it's like the image on the fxtec-page.

@xhajt03
Copy link

xhajt03 commented Sep 8, 2022

Well, interesting. However, I have a Pro1x with QWERTY and it has 'Q' next to Tab, i.e. not like on the FxTec page.

@xhajt03
Copy link

xhajt03 commented Sep 8, 2022

BTW - does it mean that your Pro1x QWERTZ layout looks exactly like the stock Pro1 QWERTZ layout depicted on the FinQwerty page (no difference whatsoever)? If so, then it answers at least one of my three bulletpoints above.

@dstango
Copy link
Author

dstango commented Sep 8, 2022

BTW - does it mean that your Pro1x QWERTZ layout looks exactly like the stock Pro1 QWERTZ layout depicted on the FinQwerty page (no difference whatsoever)? If so, then it answers at least one of my three bulletpoints above.

yes, that's how my QWERTZ-layout looks.
Minor differences: M also has µ on Fn, L has ' on Fn, Alt has a smiley on Fn, Space has an earth symbol on FN.

@xhajt03
Copy link

xhajt03 commented Sep 8, 2022

OK, fine. The differences for M, Alt and Space are the same on the QWERTY version. L is different (Fn+L gives a semicolon on stock QWERTY), that needs to be considered for the version for physical QWERTZ (I'll create the Czech layout for physical QWERTZ based on this input for you).

Moreover, I guess that based on this, we can assume that the key identifiers/names would probably be the same for the QWERTZ version of Pro1x as with the QWERTZ version of Pro1, so we can just use the Pro1 version of .kcm files from FinQwerty repository to check for possible differences - that makes it easier. :-)

@anssih
Copy link
Owner

anssih commented Sep 11, 2022

Sorry for the delay in response.

Since the QWERTZ layouts of Pro1 and Pro1 X are physically similar but just emit different scancodes, I can do a straight-forward conversion of the existing Pro1 layouts for Pro1 X. I plan to make a release with that within the next 1-2 days.

@anssih
Copy link
Owner

anssih commented Sep 11, 2022

Here is a current test version if you wish to try it out (it contains the QWERTZ-model layouts ported from Pro1, plus the two QWERTY-model layouts from @xhajt03):

APK: https://android.onse.fi/finqwerty/finqwerty-pro1x-test4.apk
Layout charts: https://android.onse.fi/finqwerty/pro1x-test4.html (scroll down for Pro1 X section)

@dstango
Copy link
Author

dstango commented Sep 11, 2022

Thank you very much!!!
I tried the German Qwertz-layout on my Pro1X, and it's working great!

@anssih
Copy link
Owner

anssih commented Sep 13, 2022

Released in v1.6.0.

@anssih anssih closed this as completed Sep 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants