Jump to content

Yellow arrow key, Different usage in Stock and LineageOS


Recommended Posts

3 hours ago, Slion said:
On 7/17/2020 at 12:11 PM, SchattengestaIt said:

The shortcut don´t work for me at all - none of them.

How odd, maybe that's something funny with LOS keyboard definitions.

I just took a quick look.  You're appear to be using slant arrow combinations, which are hidden from userspace in Lineage.   Modifiers you could use in your app would be left_alt and ctrl like stock, and LIneage also has right_alt on sym and meta on Fx key, but no access to slant arrows by apps, etc.   (What we can do with slant arrow combinations under linage is define what keycode comes directly out of the driver).     I haven't looked very close at your app but if you want it to be compatible with LOS, suggest using left_alt as the modifier for shortcuts, as alt combinations are usually reserved for apps and not being used by Android itself for anything much so nothing to interfere.

  • Thanks 1
Link to post
Share on other sites
  • Replies 50
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Popular Posts

For those using languages other than English and German on LineageOS, it would be possible to create additional keyboard maps in the kernel to match the expected keyboard layout for your language.  If

Stock is the broken implementation.  Stock should take the code from lineage.    

@tdm So we would need to provide those code lines for the changes compared how the keyboard works when German is selected? Am I right? I can find the numbers for the keys from GitHub but is the whole

Posted Images

11 hours ago, Craig said:

You're appear to be using slant arrow combinations, which are hidden from userspace in Lineage

That's rather unfortunate. Slant arrow AKA Function AKA Fn has been a common feature on keyboards for years. Mess with Fx and Sym keys if you want to but leave the common modifiers untouched on the default keyboard layout to avoid such situations. Replacing Function with Alt is like replacing Ctrl with Shift, it does not make sense, not in a default configuration anyway.

Link to post
Share on other sites
7 hours ago, Slion said:

That's rather unfortunate. Slant arrow AKA Function AKA Fn has been a common feature on keyboards for years. Mess with Fx and Sym keys if you want to but leave the common modifiers untouched on the default keyboard layout to avoid such situations. Replacing Function with Alt is like replacing Ctrl with Shift, it does not make sense, not in a default configuration anyway.

 

Okay, a few things to note here:

 

The slant arrow is not a standard key.  Unless I missed something, it is never stated anywhere that the slant key is supposed to be a Fn key.

 

Certainly most keyboards have a Fn key.  But it was not on the original PC102 keyboard and it is not difficult at all to find a keyboard today that lacks one.

 

Now, as for actually handling the slant arrow key: (1) How would you propose to do make it behave such that one can make it both act like a Fn key and have the yellow labelled keys be available without extra keystrokes being reported? Any solution must also work with userspace key repeat. (2) Why is it useful to have a Fn key at all, given that the Fn key is a non-standard key and exists to provide access to non-standard functions like sleep, volume, etc. while the Pro1 has no labels for non-standard functions?

 

  • Like 3
Link to post
Share on other sites
4 hours ago, tdm said:

The slant arrow is not a standard key.  Unless I missed something, it is never stated anywhere that the slant key is supposed to be a Fn key.

The key with the slant arrow on stock Pro1 keyboard is the Fn key. By deviating from this on LOS you are potentially breaking apps. Function key is typically used on non standard keyboards such as laptops or smartphones to access device specific functionalities.

Link to post
Share on other sites
4 hours ago, tdm said:

How would you propose to do make it behave such that one can make it both act like a Fn key and have the yellow labelled keys be available without extra keystrokes being reported?

I'm confused, I'm pretty sure that's what stock does.

Link to post
Share on other sites
2 minutes ago, Slion said:

I'm confused, I'm pretty sure that's what stock does.

 

I am pretty sure it's not.  Try running getevent on stock and then pressing Fn+P to get a forward slash.  You should see key down for Fn followed by key down for '/' or something similar.

 

The Lineage kernel tries to emulate a normal keyboard as much as possible because the stock way of doing the keyboard is pretty awful.  You must leave keyboard layout unconfigured or things break.  Which is very confusing to many users because Android tells you to configure the keyboard layout.  Further, because of this, you cannot leverage any of the locale specific keyboard layouts that ship with Android.

 

Sorry, but I feel strongly that avoiding all that awfulness by making the slant arrow a dead key is a huge win.

 

  • Like 2
  • Thanks 1
Link to post
Share on other sites
5 hours ago, tdm said:

Why is it useful to have a Fn key at all, given that the Fn key is a non-standard key and exists to provide access to non-standard functions like sleep, volume, etc. while the Pro1 has no labels for non-standard functions?

It's also there to give access to missing standard functions, yellow labels in our case.

Link to post
Share on other sites
2 minutes ago, Slion said:

It's also there to give access to missing standard functions, yellow labels in our case.

Which missing standard functions are you referring to?  The only yellow labels I see that isn't on a standard PC102 keyboard are the emoji label on Alt and the WWW label on the spacebar.  Both of these are functional on Lineage.

 

  • Like 2
Link to post
Share on other sites
4 minutes ago, tdm said:

Try running getevent on stock and then pressing Fn+P to get a forward slash.  You should see key down for Fn followed by key down for '/' or something similar.

My point exactly, slant arrow is Fn on stock.

Link to post
Share on other sites
1 minute ago, Slion said:

My point exactly, slant arrow is Fn on stock.

 

I think you misunderstood my point.  When you press '/' on a normal keyboard, you don't do it with Fn down.  That is incorrect behavior from the keyboard driver.  An app would be within reason to interpret this as Fn+'/' and do something unexpected, or nothing at all.

 

That said, it is very much possible to make the slant arrow into Fn modifier for the keys without yellow labels so you could press eg. Fn+1 and get F1.  In fact this is one of the standard customization options on Lineage.  You can do this with any key(s) that you choose.

 

  • Like 2
Link to post
Share on other sites
33 minutes ago, tdm said:

think you misunderstood my point.  When you press '/' on a normal keyboard, you don't do it with Fn down.  That is incorrect behavior from the keyboard driver.  An app would be within reason to interpret this as Fn+'/' and do something unexpected, or nothing at all.

Not so, Function key is for device specific features, meaning any app using it is supposed to be aware of the hardware it is running on. 

Link to post
Share on other sites
1 hour ago, Slion said:

Not so, Function key is for device specific features, meaning any app using it is supposed to be aware of the hardware it is running on. 

So "/" and "?" are "device specific features?"  That is what is incorrect behavior and incredibly inconvenient for the user. Luckily, the yellow symbols on the top row can be redirected to shift, but the insanely placed "/" and "?" cannot since they are on a letter key which is already making use of shift.  I can't even imagine how they came up with such a scheme nor why they thought it would be a good idea.  It's  a human factors nightmare.

Edited by Hook
  • Like 2
Link to post
Share on other sites

The thread is going far astray from display into keyboard land.... I wonder if it should be split, or these post merged into a different thread. Any good suggestions of a destination thread?

Anyway I think that @Hook has the main point in this. The shifted Qwerty is not an optimal starting point, and that is what @tdm have found a quite clever way to work around so the keyboard acts like a (shifted) standard keyboard, that then can use standard language layouts on top.

But I personally find that using qwertY on the qwertZ keyboard as done by FinQWERTY is a better starting point. Including a /? key.
See this https://android.onse.fi/finqwerty/#pro1

image.png.fbe19c42a8ff30d3a83cfbce7f5df89a.png

  • Like 3
Link to post
Share on other sites
44 minutes ago, EskeRahn said:

The thread is going far astray from display into keyboard land.... I wonder if it should be split, or these post merged into a different thread. Any good suggestions of a destination thread?

I didn't quickly find an on-point thread using search unless we hijack the " mapping different chars to qwerty keyboard thread."  Might be better just to break the posts out into a new thread, something like "Pro 1 Keyboard layout issues and questions."  Feel free to come up with a better title.  😄
 

  • Like 1
Link to post
Share on other sites
On 7/25/2020 at 11:38 PM, Slion said:

Replacing Function with Alt is like replacing Ctrl with Shift, it does not make sense, not in a default configuration anyway.

That's what they do on Sailfish btw.  Slant arrows are Right_Alt.   And the Sym key is slash/questionmark.   And that's a perfectly acceptable solution too.   Both better than stock.

What I actually hope to do, once we can reconfigure right slant arrow, is make it my slash key.  But people who use international layouts may set it as Right_Alt (in addition to the right_alt lineage gives us on sym key and is the standard android keymapping for sym key on other devides like photon q etc, hence why its the key used for Android keyboard layouts level 3, just like PC, and something I assume will get fixed in stock one day as currently sym key useless there.).   But another option people could set that right slant arrow to to whatever stock assigned it to oem_r or whatever.

Btw only pc keyboards I've seen with Fn key are laptops, and those keys are for special functions specific to the laptop like volume up and lcd brightness etc.  It's not a key used for apps.  Apps use alt and sometimes ctrl when they need a modifier key.

Anyway what's wrong with changing to using Alt for your shortcuts in your app? 

Edited by Craig
  • Like 1
Link to post
Share on other sites
44 minutes ago, Craig said:

Btw only pc keyboards I've seen with Fn key are laptops

Compact laptop like keyboards have been a thing for over a decade.
This morning I happen to have four keyboards on my desk and just as many Fn keys 😁IMG_20200727_090052_compress57.thumb.jpg.a8b1d837206e2e7232da1b79c1b7adf1.jpg

Though PC keyboards do not usually expose their Fn keys to application developers which is I understand exactly what @tdm has done on LOS. However luckily for app developers mainstream smartphone OSs have typically exposed Fn as any other keyboard modifier which makes a lot of sense and provides much needed extra customisation options on exotic devices featuring non standard keyboards.

Edited by Slion
Link to post
Share on other sites
33 minutes ago, Craig said:

right_alt lineage gives us on sym key and is the standard android keymapping for sym key on other devides like photon q etc, hence why its the key used for Android keyboard layouts level 3, just like PC, and something I assume will get fixed in stock one day as currently sym key useless there.).  

Sym key is indeed broken on stock at the driver level if I recall well. It should indeed be one of the Alts.

Link to post
Share on other sites

As a Scandinavian I want to make one point clear. We do not have "/" and "?" marks as independent buttons on standart ISO QWERTY keyboard. Typically they are used as below:

  • "Shift" + "7" = "/"
  • "Shift" + "+" = "?" (where "+" is located next to the "0")

Pro1 QWERTZ is arranged like this on stock when you select German except that there is a catch. Now those keys are working like this:

  • "Shift" + "7" = "7" so you have to type "Yellow arrow" + "7" = "/"
  • However "Shift" + "ß" = "?" and "Yellow arrow" + "ß" = "ß" (where "ß" is located next to the "0")

Developer of the FinQwerty fixed this issue. If you select Finnish for QWERTZ via FinQwerty you can use either "Shift" or "Yellow arrow" for number keys to get upper characters. For letters "Shift" obviously gives to you upper case and "Yellow arrow" upper characters like "@".

So at least for me, it is very logical to use "Yellow arrow" for upper characters that are printed with Yellow color. I would hope that for LOS also.

  • Like 1
  • Thanks 1
Link to post
Share on other sites
1 hour ago, Craig said:

Anyway what's wrong with changing to using Alt for your shortcuts in your app? 

More code path harder to maintain. It's very unlikely I will ever bother adding LOS specific features in my apps, mostly because I'm not using it for now. The point of LOS is that it is compatible with Android. I do think fixing what's broken like the sym key makes sense.  However leaving the rest of the scan codes and default mapping untouched would have been the easier and better option, as far as compatibility goes.

Edited by Slion
Link to post
Share on other sites
32 minutes ago, FlyingAntero said:

So at least for me, it is very logical to use "Yellow arrow" for upper characters that are printed with Yellow color. I would hope that for LOS also.

Indeed, to me WYSIWYG rules.
PS: I have not giving up on your custom qwertz layout 😁

Edited by Slion
  • Like 2
Link to post
Share on other sites
21 minutes ago, Slion said:

More code path harder to maintain. It's very unlikely I will ever bother adding LOS specific features in my apps, mostly because I'm not using it for now. The point of LOS is that it is compatible with Android. I do think fixing what's broken like the sym key make sense.  However leaving the rest of the scan codes and default mapping untouched would have been the easier and better option, as far as compatibility goes.

A very major reason for using LineageOS currently is that it fixes a lot of what is broken in the Stock Android implementation....

One could even says that @tdm's take on the Yellow arrow is ALSO in "fixing what is broken", as it allows for the few billion users not using English as their primary language to better use the device... As it standardise the qwerty, so standard 'language packs' can be used on top. So it might not be a bad idea at all to include that too in a future Stock OTA....

  • Like 1
Link to post
Share on other sites

Yeah exactly, he is fixing what is broken.  There is no slash key.  With stock if you pick any layout at all you have no way at all to really use them because then you have no way to get slash key with any english layout, and using us-intl is useless without alt-gr as are probably most of the other foreign languages.     And their hack of a workaround (using no layout) makes it so shift doesnt even work right.  So 100% what Eske said, this is most definitely a fix.     Plus its a feature cuz we get home,end,pgup/pgdn, F1-F12 keys etc all natively, something Fxtec should have implemented and hopefully does soon, and we have the ability to generate any keycode we want with all the other unused slant arrow combinations.

Why do you want to use the slant arrow key so bad anyway, I dont get why not just use alt or ctrl?  Like every other app ever.

  • Like 2
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...

Important Information

Terms