Jump to content

FYI: Lineage Keyboard Shortcuts & Other cool features not (yet?) in stock


Recommended Posts

Thanks to tdm, mccreary, and everyone who has contributed to aosp, cyanogenmod, and lineage OS, as of test6 we now have keyboard shortcuts, referred to as Bookmarks.  Since the lineage thread is getting long and too many topics, thought it might be worth starting a thread to share this info.

The Fxtec logo key (Fx, now assigned as Meta) in combination with various keys will perform certain functions and with letters open certain types of apps.  The first time you use it, it'll let you choose which app to set as default.

Here's the App Bookmarks I've found to work:

  • Add (Calculator)
  • Browse (Web)
  • Contacts
  • E-mail
  • List (Calendar)
  • Maps
  • Notifications
  • Play (Music)

And other functions:

  • BACKSPACE: Android Back
  • DEL: Android Forward
  • ENTER: Android Home
  • SlantArrow+P: List Keyboard Shortcuts

 For reference, these come from AOSP: https://github.com/aosp-mirror/platform_frameworks_base/blob/6bebb8418ceecf44d2af40033870f3aabacfe36e/core/res/res/xml/bookmarks.xml

Others that could be added by developers, like Y for youtube, and plus alt for capslock is supposed to be hardcoded i think, but doesn't seem to work for me.

 

Screenshot_20200224-191844_Nova_Launcher.png

Screenshot_20200224-191903_Nova_Launcher.png

Edited by Craig
formatting all messed up cuz i used braces
  • Like 6
Link to post
Share on other sites

So I said other cool features. 

How bout wake on keypress?  Now it works for every key.  And backlight too.

You can move the status bar time back to the right in settings.   

You can select which orientations are permitted during auto-rotate.  If you think your phone works better in portrait upside down, disable 0degrees and enable 180.  If you dont want it to accidentally upside-down landscape and confuse you when you try to open the keyboard, then disable 270.

Also by default, it displays LTE to indicate 4G connections.  Someone complained about this in stock, I assume this user prefers LTE as they wouldn't want to confuse themself and think they were using some other top-secret 4G technology they hadn't heard of - problem solved!

You may recall the emoji keyboard that pops up on stock when you release Alt without pressing another letter.  Well now we also get a symbol keyboard the same way with the SYM key (now assigned to Right Alt).   I think this requires gboard, but not 100% sure, as I do have gboard.

(Terminal is included with Lineage; enable it in developer settings.)

Screenshot_20200224-200326_Terminal.png

 

And, if you hold down a letter that can accept an accent, you get choices:

e

 

Screenshot_20200224-201424_Firefox.png

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

Fx, now assigned as Meta

Interresting so that's what Bookmarks are using. I ought to give it a try with Fx Qwerty though I'm far from impressed with those default shortcuts.

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

This ought to make it to stocck somehow 😃

This can easily be done by setting it to thumb keyboard instead of full keyboard, which I expect they'll fix in next OTA  But, I dunno if this particular feature will play friendly with the longpress shortcuts they added to their launcher.   Longpress accents would most likely still work other places outside launcher of course...  (and the bookmarks I mentioned above are global, unrelated to launcher, can switch app to app that way) and you don't need them while using the launcher, just dunno if it could interfere. 

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

This ought to make it to stocck somehow 😃

Unlikely, but we shall see. The change that enables the accent chooser is the same one that enables sticky shift: setting the keyboard type to ALPHA in the kcm file (instead of FULL). I'm not sure if that can be overridden. Perhaps others could investigate.

 

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

This can easily be done by setting it to thumb keyboard instead of full keyboard,

 

3 minutes ago, tdm said:

The change that enables the accent chooser is the same one that enables sticky shift: setting the keyboard type to ALPHA in the kcm file (instead of FULL).

Good to know. 

7 minutes ago, Craig said:

longpress shortcuts they added to their launcher.

I'm not using those anyway :} They should really drop that feature and redirect users to that Key Mapper app

8 minutes ago, tdm said:

I'm not sure if that can be overridden.

I tried it but it didn't work. Maybe I should try harder.

Link to post
Share on other sites
2 hours ago, Craig said:

This looks like something that could perhaps be put into another APK? I fail to find any documentation regarding this and feel like it could quickly result in conflicts if just any APK could actually define those...

btw. my clock is on the right side (in more than one way) in stock too... well via Substratum, but it's not impossible. Having it as a setting would be cool, but question is how close Fx wants to stay to that unmodified experience.

 

That symbol keyboard looks like something that hasn't been touched for a couple of years. The design is a bit out of place, but I suppose it's better than not having it.

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

This ought to make it to stocck somehow 😃

Not quite the same, but I did discover the stock keyboard layout (QWERTY, here) supports some accents using the Alt key. E.g., alt+e is a dead acute accent, so alt+e, a will generate á.

Alt combinations I have discovered:
Alt+` = dead grave accent (e.g., à)
Alt+e = dead acute accent (e.g., á)
Alt+u = dead diaeresis (e.g., ä)
Alt+i = dead circumflex accent (e.g., â)
Alt+s = sharp s (ß)
Alt+c = c with cedilla (ç)
Alt+n = dead tilde (e.g., ã)

  • Like 1
Link to post
Share on other sites
3 minutes ago, rkjnsn said:

Not quite the same, but I did discover the stock keyboard layout (QWERTY, here) supports some accents using the Alt key. E.g., alt+e is a dead acute accent, so alt+e, a will generate á.

Alt combinations I have discovered:
Alt+` = dead grave accent (e.g., à)
Alt+e = dead acute accent (e.g., á)
Alt+u = dead diaeresis (e.g., ä)
Alt+i = dead circumflex accent (e.g., â)
Alt+s = sharp s (ß)
Alt+c = c with cedilla (ç)
Alt+n = dead tilde (e.g., ã)

Ho yeah, I'm fully aware of those 😃

 

Link to post
Share on other sites
6 hours ago, Craig said:

Screenshot_20200224-200326_Terminal.png

 

Is this a layout given by LineageOS, or something within your control?

If within your control, it would be awesome to extend it to mimic the four top rows of physical keys, and then let the corresponding key pressed when displayed give the symbol.

e.g. Press and release of Sym displays the map, a press on the 1-key, then gives the top left symbol displayed. etc. (preferable with the printed letters faintly printed on the image to ease orientation)

Make it even more awesome: allow Sym used as a modifier to give the same, e.g. Sym+1 ....

And this could be extended to more complex modifier combinations, giving access to and help for even more symbols....

...Just wishing/brain-storming...

  • Like 1
Link to post
Share on other sites
4 hours ago, Slion said:

@Craig @tdm

Do you guys happen to know the keyboard PID, VID and device name? I would like to try to override it into ALPHA keyboard using those information.

This is for stock...

https://github.com/tdm/android_kernel_idealte_msm8998/blob/oem-history/drivers/input/keyboard/aw9523b.c#L1901

 

https://github.com/tdm/android_kernel_idealte_msm8998/blob/oem-history/drivers/input/keyboard/aw9523b.c#L865

 

I changed those in Lineage.

 

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

Is this a layout given by LineageOS, or something within your control?

If within your control, it would be awesome to extend it to mimic the four top rows of physical keys, and then let the corresponding key pressed when displayed give the symbol.

e.g. Press and release of Sym displays the map, a press on the 1-key, then gives the top left symbol displayed. etc. (preferable with the printed letters faintly printed on the image to ease orientation)

Make it even more awesome: allow Sym used as a modifier to give the same, e.g. Sym+1 ....

And this could be extended to more complex modifier combinations, giving access to and help for even more symbols....

...Just wishing/brain-storming...

I believe the layout of the symbol keyboard is overridable by the device at build time, but not run time. The behavior is most likely not overridable at all.

 

Link to post
Share on other sites

So changing the keyboard type is really not possible from the application side.

See: https://gitlab.com/SaberMod/pa-android-frameworks-base/commit/6ec6f79e1ac1714e3b837796e99f07ff88f66601#5a1e1542c6bd325d04e1e1df50a937413edccd06_52_60

It just loads OVERLAY types.
Possibly doable on rooted device I guess.

@tdm On LineageOS is there any chance you guys could provide a way for the user to select how she wants to use the keyboard, ALPHA or FULL?

Link to post
Share on other sites
5 hours ago, EskeRahn said:

Make it even more awesome: allow Sym used as a modifier to give the same, e.g. Sym+1 .

This should already be possible in keyboard layout if you want....  The emoji/symbol keyboards only comes up when you RELEASE the alt keys.  They should still be able to be used as modifiers.... but you wouldn't see the popup then.

Link to post
Share on other sites
8 minutes ago, Craig said:

This should already be possible in keyboard layout if you want....  The emoji/symbol keyboards only comes up when you RELEASE the alt keys.  They should still be able to be used as modifiers.... but you wouldn't see the popup then.

Too bad. That sort of make it useless.

I would want something similar to what we got with Alt: Press and release of Sym to show the help, and Sym used as a modifier (if you remember the combos you want).

  • Confused 1
Link to post
Share on other sites

Since alt is supposed to be sticky, I guess you could still use it the way you want and see the popup keyboard....  but one would have to test it to be sure it works that way.     The symbol keyboard from right alt should work exactly the same as the emoji keyboard on left alt, and neither one should pop up if you press another key before releasing respective alt key.

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

So changing the keyboard type is really not possible from the application side.

See: https://gitlab.com/SaberMod/pa-android-frameworks-base/commit/6ec6f79e1ac1714e3b837796e99f07ff88f66601#5a1e1542c6bd325d04e1e1df50a937413edccd06_52_60

It just loads OVERLAY types.
Possibly doable on rooted device I guess.

@tdm On LineageOS is there any chance you guys could provide a way for the user to select how she wants to use the keyboard, ALPHA or FULL?

The keyboard character map file determines the type, FULL or ALPHA.  It is loaded at boot and cannot be changed after.  Perhaps I could implement an option in settings to switch.  The documentation is here.  I am currently placing the default kcm file in "/vendor/usr/keychars/DEVICE_NAME.kcm".  The setting could place a modified keymap in, say, "/data/system/devices/keychars/Vendor_XXXX_Product_XXXX.kcm".

  • Like 1
Link to post
Share on other sites

Just figured out how to use another cool feature of having the Fx key assigned as meta - it opens your default Assit app (by itself - no other key necessary).  By default in Lineage it was set to None and doesn't come with any apps to assign it to, but if you have 3rd party apps installed, you might find something available there.

In my case, when set to Firefox, it opens a new Firefox tab (whether Firefox is currently open or not).   When set to Google, it immediately starts listening for voice instructions.  Cool!   

 

Screenshot_20200227-140529_Settings.thumb.png.849c23726993b6310709eb1e4de1f4f8.png

 

And one truly unique feature, not from aosp or lineage but I believe made by tdm himself, is slant arrow Fn key combinations can be mapped by the user in a simple text file, without touching the kcm layouts.  (The right slant arrow key cannot yet be mapped independently, but that's coming eventually too, something I'm personally anxious for!)   The method is described by tdm in the lineage thread and is indeed prone to errors, having to reference lists of keycodes and do some dec/hex math to get it right, but in the future he's planning a UI to make that easier, but even without, it's awesome feature.   I used this feature to make Fn+space to function as power button, so I don't have to reach around to the back if leaving the keyboard open to turn off screen, and to make Fn+number row into F1-F12 for use in dosbox/vnc/etc.

Edited by Craig
Link to post
Share on other sites

I'm not quite ready to jump to Lineage yet waiting until it is nearer Official, but I did send tdm another couple of beers for his hard work again and plan to keep doing so. 🍺

  • Like 2
  • Thanks 1
Link to post
Share on other sites

@Hook Last night I read a post where you mentioned you like reading e-books in portrait with the keyboard open.  I saw your screenshot with white text on black background, and thought to myself, that would probably work for reading in the dark in bed - except now that the keyboard backlight works, that might be annoying.  Then I remembered, @JooJooBee666 solved that with his KB Backlight Manager.  With the handy-dandy KB Backlight toggle in quick settings, one could turn it off.

Screenshot_20200227-153519_Nova_Launcher.thumb.png.b5dfb7676623f05065beebb5948515d7.png

https://community.fxtec.com/topic/2721-kb-backlight-manager-for-lineageos-builds/

 

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

If anyone wants to do it in stock, you can use @elvissteinjr's tasker profile (https://community.fxtec.com/topic/2283-tasker/?do=findComment&comment=45359) and create a quick settings item for the task used in that profile.  That will turn on the keyboard backlight.  You can create a similar task that sends keyevent 135 to turn off the physical keyboard and add that as a quick settings item too.  It could be made a toggle, with some use of variables and if/then logic in the task.

Edited by david
  • Like 1
Link to post
Share on other sites
On 2/27/2020 at 2:08 PM, Craig said:

And one truly unique feature, not from aosp or lineage but I believe made by tdm himself, is slant arrow Fn key combinations can be mapped by the user in a simple text file, without touching the kcm layouts.  (The right slant arrow key cannot yet be mapped independently, but that's coming eventually too, something I'm personally anxious for!)   The method is described by tdm in the lineage thread and is indeed prone to errors, having to reference lists of keycodes and do some dec/hex math to get it right, but in the future he's planning a UI to make that easier, but even without, it's awesome feature.   I used this feature to make Fn+space to function as power button, so I don't have to reach around to the back if leaving the keyboard open to turn off screen, and to make Fn+number row into F1-F12 for use in dosbox/vnc/etc.

And now, with test8, the stuff I'd done in custom keymaps is built in as an option, I don't even need to use the custom keymap I made:

Screenshot_20200302-121711_Advanced_settings.thumb.png.b67b7b9d0b984f2ee299b7d2486827cc.png

 

In the future I hope/imagine there may be an option there to use the the right slant arrow as slash/questionmark (which I will use) or maybe even right shift or right control incase someone needs one of those keys for something, or prefers an easier to reach right shift.

Can also see he's working on a switch for qwertz, rumour has it the qwertz fn-keymap doesn't match print completely, but I suspect it will be soon.  (And with sym key as right-alt, my understanding is those standard combos are already working if you use a standard regional layout).

The other noticeable new feature in test8 is the touchscreen margin.  I'm not sure if it's affecting all four borders or (hopefully) just the long edges.

Screenshot_20200302-122927_Advanced_settings.thumb.png.7bfb42ad6321950482dee67097db9f4c.png

 

 

 

  • Like 1
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