Modifying navigation buttons with keyboard layout - Google Pixel 4 Questions & Answers

Hello, oh great wise ones of the android modding community. I come to you with some questions and a desire to learn.
I have just recently rooted my pixel 4 and installed crDroid, and have realized that i want to make some changes to the navigation buttons when the keyboard is in landscape mode.
Notice in these two pictures how the back button is either on top or bottom, depending on which way the phone is rotated. How can I switch the order for just one of the orientations?
Also, while we're at it, how would I make it so that the nav buttons only show up on the right-hand or left-hand, no matter which way the device is turned?
In case it is relevant, I will say that I am fairly experienced with rooting and am proficient with Java, Linux, & C++.
Thank you

Related

[APP][Updated 16-10-2008]CapacitiveFingerLock (Proof of Concept with sources)

Having written StylusLock I wanted an additional lock/unlock method. Although StylusLock works great, I wanted some extra features:
* to have it possible to lock and unlock "one handed". The StylusLock approach cannot be done "one handed", e.g. on a bike.
* Also some people do not like to operate with the StylusLock (always).
* The combination with this new CapacitiveFingerLock and existing StylusLock will suit more people.
* And sometimes people will use the Stylus, so they will get the right behaviour depended on the usage pattern
* Still the goal is to let it consume almost no CPU and battery and KISS to operate
I discovered with StylusLock that when the TouchPanel and Hardware keys are locked, still the Zoom function works in e.g. Opera.
You can try yourself, using StylusLock:
1. Start Opera
2. Lock the Touch Diamond or Touch Pro with StylusLock
3. TouchPanel and all hardware keys are locked
4. Try to Zoom in/Zoom out in Opera, this still works with the NavWheel
5. Also the Ok button seems to react
I figured out via Scott Seligman and Koushik Dutta how to programmatically access the Capacative Touchpads. You can read also more here: [REF]Capacitive touchpad apps
So this idea is implemented in CapacativeFingerLock. But I am not using the NavWheel idea, but just uses the Capacative hardware area for locking/unlocking. The idea is again simple and clever. When you softly touch the area where the hardware keys are located (so do not press the keys, just gently touch them), the up/down and position area can be detected. I programmed that when the same area is touched gently 3 times within a second (without touching another area), the lock status is toggled.
I made a proof of concept program (just copy the exe inside the zip file attachment to your phone and just execute it), which shows how it is going to work. Just play around with softly touching the hardware panel, to see what happens.
If am working on integrating CapacativeFingerLock with StylusLock, to have a working "real locking" application. The Proof of Concept program just shows that it is possible.
Reserved for future use
Another one for future use.
very nice concept....now i noticed you posted a link of this thread in the wheel to unlock thread...would there be a way to possibly implement a config tool that lets you choose say, touch 3 times softly, or run your finger around the circle?
Malik05 said:
very nice concept....now i noticed you posted a link of this thread in the wheel to unlock thread...would there be a way to possibly implement a config tool that lets you choose say, touch 3 times softly, or run your finger around the circle?
Click to expand...
Click to collapse
In principle this can be done. But because the NavWheel is also used for other purposes (Zoom In/Out), I have chosen not to use the NavWheel, but the 3 times gently touching. In this way there is no interference with other existing applications.
I'll try that, it seems like no one cares aboyt the capacitive touch pad, it seems like an amazing thing that we've got that is so neglected. I hope to give some positive feedback later, but first I have some rom flashing to play with!
Thanks for the work, there must be so many possible implementations for this, I hope this is just the beginning of something much bigger.
How about a simple tap to launch app?
i went ahead and installed it, and it works very well...Will there be a (pretty) GUI to show that it was unlocked?
Also the diamond does have multi touch on that pad area, which enables a "trace" of the movement of your touch
http://www.youtube.com/watch?v=f3Owgcos_KY
Since the nav sensor wont be so ideal, how about sliding your finger from the top of the pad to the bottom (lets say, place your finger on the back button, and gently moving it down to initiate unlock, with a GUI on the screen following your movement, as you go closer to the bottom, the color changes from lets say, red, to green...with incremental color changes in between)
Instead of 3 taps, why not a swipe between the home and back keys, which seems much more natural.
Surur
surur said:
Instead of 3 taps, why not a swipe between the home and back keys, which seems much more natural.
Surur
Click to expand...
Click to collapse
I imagine it is just harder to implement for a proof of concept.
Personally I think there are enough ways to lock the diamond, whether you swipe the screen or 1cm below it is not a revolution, but if swiping the capacitive touch pad could be made to launch desired apps from selected gestures, that would be a revolution, like dynamo3 or hibernate or even standby. I think a lot of people here would want that over another locking solution. Good will intended!
Just tried it.
This is very cool very very cool
Thanks for time invested in such a cool development.
surur said:
Instead of 3 taps, why not a swipe between the home and back keys, which seems much more natural.
Surur
Click to expand...
Click to collapse
Swiping is not so easy one handed. Touching gently 3 times is much easier one handed, holding your Touch Diamond or Touch Pro firmly and touching with your thumb.
However, I can imagine other sort of applications which can use the swiping for other sort of operations. Both are possible with the programming API I made.
uniqueboy said:
I imagine it is just harder to implement for a proof of concept.
Personally I think there are enough ways to lock the diamond, whether you swipe the screen or 1cm below it is not a revolution, but if swiping the capacitive touch pad could be made to launch desired apps from selected gestures, that would be a revolution, like dynamo3 or hibernate or even standby. I think a lot of people here would want that over another locking solution. Good will intended!
Click to expand...
Click to collapse
I am going to share the source code. I have written it in C#. And others can get ideas and take over some of the source code for their own application. At the end we profit all of it.
ZuinigeRijder said:
I am going to share the source code. I have written it in C#. And others can get ideas and take over some of the source code for their own application. At the end we profit all of it.
Click to expand...
Click to collapse
I like your style, that is the the kind of development attitude that keeps here!
ZuinigeRijder said:
Swiping is not so easy one handed. Touching gently 3 times is much easier one handed, holding your Touch Diamond or Touch Pro firmly and touching with your thumb.
However, I can imagine other sort of applications which can use the swiping for other sort of operations. Both are possible with the programming API I made.
Click to expand...
Click to collapse
If you are open to other ideas, I would love the area from the back to home key to be a scroll bar when the device is in landscape mode. Grabbing the narrow on-screen scroll bar can be tricky, and the Touch Pro lacks the scroll wheel of the HTC Kaiser.
Surur
Have been looking into this myself as well. The only code I found was managed C#. Do you think we can use this in our native C code? Looks promising though!
ZuinigeRijder said:
Having written StylusLock I wanted an additional lock/unlock method. Although StylusLock works great, I wanted some extra features:
* to have it possible to lock and unlock "one handed". The StylusLock approach cannot be done "one handed", e.g. on a bike.
* Also some people do not like to operate with the StylusLock (always).
* The combination with this new CapacitiveFingerLock and existing StylusLock will suit more people.
* And sometimes people will use the Stylus, so they will get the right behaviour depended on the usage pattern
* Still the goal is to let it consume almost no CPU and battery and KISS to operate
I discovered with StylusLock that when the TouchPanel and Hardware keys are locked, still the Zoom function works in e.g. Opera.
You can try yourself, using StylusLock:
1. Start Opera
2. Lock the Touch Diamond or Touch Pro with StylusLock
3. TouchPanel and all hardware keys are locked
4. Try to Zoom in/Zoom out in Opera, this still works with the NavWheel
5. Also the Ok button seems to react
I figured out via Scott Seligman and Koushik Dutta how to programmatically access the Capacative Touchpads. You can read also more here: [REF]Capacitive touchpad apps
So this idea is implemented in CapacativeFingerLock. But I am not using the NavWheel idea, but just uses the Capacative hardware area for locking/unlocking. The idea is again simple and clever. When you softly touch the area where the hardware keys are located (so do not press the keys, just gently touch them), the up/down and position area can be detected. I programmed that when the same area is touched gently 3 times within a second (without touching another area), the lock status is toggled.
I made a proof of concept program (just copy the exe inside the zip file attachment to your phone and just execute it), which shows how it is going to work. Just play around with softly touching the hardware panel, to see what happens.
If am working on integrating CapacativeFingerLock with StylusLock, to have a working "real locking" application. The Proof of Concept program just shows that it is possible.
Click to expand...
Click to collapse
A while ago I posted about the Windows Messages received by the form for capacitive touch events. Is that what you ended up using to figure out where on panel is being touched? Mind posting some code so I can add it to the Sensors assembly?
Great idea. Defienetly it will be my way of locking device. StylusLock works nice but can't be operated by one hand so its useless for me. SensorLock uses battery and i've drop my phone already unlocking it.
surur said:
If you are open to other ideas, I would love the area from the back to home key to be a scroll bar when the device is in landscape mode. Grabbing the narrow on-screen scroll bar can be tricky, and the Touch Pro lacks the scroll wheel of the HTC Kaiser.
Surur
Click to expand...
Click to collapse
This can be surely done, programmatically. But I do not know if you can control the scrolling of other applications. The latter seems to me difficult?
Anyway, when a lot of applications are going to use gestures using the capacative areas, there will be going conflicts (different programs reacting differently on different gestures).
For the locking application I want to made, I see also some different gestures possibilities:
- 3 taps for locking/unlocking
- swipe left to right for Power off
- swipe right to left for starting a configured application
And I am sure I can come up with other gestures and actions....
drvdijk said:
Have been looking into this myself as well. The only code I found was managed C#. Do you think we can use this in our native C code? Looks promising though!
Click to expand...
Click to collapse
Actually I started with C++ and had also a working Proof Of Concept. However, because I am new to Windows Mobile Programming, I also wanted to use C# as next project. I have developed programs in a lot of languages (also in C++ and C#), but I like C# more. And I wanted to do this now for Windows Mobile, to get experience with this. Note that the C# sample is using only .NET 2.0, so you do not need .NET 3.5.
You can find a C++ sensortest program, which was available on Scott's weblog:
http://scottandmichelle.net/scott/cestuff/sensortest.zip
ZuinigeRijder said:
This can be surely done, programmatically. But I do not know if you can control the scrolling of other applications. The latter seems to me difficult?
Click to expand...
Click to collapse
I dont know if you can manipulate the scroll bar of another application directly (though this would be ideal) but at the least maybe a page down keystroke could be sent to the active window.
Surur

HD2 rotation options and keyboard anomalies

i've searched for ways to open up other rotation angles as well as autorotation for any and all apps under the sun. most people suggest bsbtweaks and it really does do the job, but only rotates to the allowed 270degrees angle (thats -90degrees). effectively, it just adds the window class to the list of window classes that the built in HTC g-sensor mechanism will give respect to.
so i looked some more and found "changescreen" to fit the bill. after setting up exceptions, it works quite well to allow all other applications (except for the exceptions which include sense) to rotate to 90degrees, 180degrees (this looks way cool some times!), and the usual 270degrees.
HOWEVER, the point of this new thread is to discuss something that seems to be quite an attractive option if it can be made to work 100%. i've noticed that the onscreen landscape keyboard is MUCH more usable in the 90degrees rotation. this is because those damned cursor keys take up 0.5 inch of space that is balanced out by the hardware keys on the other side, thus placing the rest of the keyboard SQUARELY in the middle of your thumbs! contrast this with the experience on the default 270degrees rotation where the cursor keys and hardware keys end up on the same side, forcing the user to stretch out the right hand thumb to reach the middle of the keyboard.
the amazing thing is that keyboard really works 99% properly in the 90degrees orientation. the 1% catch? the little preview squares that appear while tapping a key seem to be using a buggy rotation matrix when the screen is in this angle! effectively, this makes the preview squares upside down and on the wrong side of the center line of the keyboard!
so for me, TWO things would make life much sweeter on the HD2:
1. keyboard preview squares should appear right side up and on the correct area near the tapped key in 90degree rotation.
2. i would also like to DISABLE the 270degree rotation altogether and force the HTC g-sensor mechanism to think that the 90degree rotation is DEFAULT. i know i can achieve this partially using "changescreen" but sense will still rotate ONLY in the 270degree direction in the album and music tab. with this tweak, one can rely on the built in mechanism and also be able to enjoy the keyboard in the more comfortable 90degree rotation.
any 1337 h4x0r222 with some 1337 suggestions/tweaks?
some updates...
first, there is another anomaly i didn't notice before pertaining to the thumb friendly scroller that pops up when touching a scroll bar. this popup scroller is also being drawn upside down and on the wrong side of the screen in 90degree rotation.
other updates include:
1. tried toggling HKLM\System\GDI\Rotation\LandscapeMode from 0 to 4, followed by soft reset, no joy!
2. tried toggling HKLM\System\GDI\Rotation\LandscapeFixed from 1 to 0, followed by soft reset...the right handed and left handed options in Screen under Settings->System become available but the g-sensor autorotate doesn't seem to respect the choice set here, so no joy!

[Q] Help with fixed buttons...

OK, the fixed buttons to the right of the screen. 2 things. is there a way to put them on the title bar like on other android tabs? I figure it must just be something I'm missing but I'm not sure. there must be some way. without them being backlit if it's dark I can't seem them obviously. TIA.
Look for Button Savior in the android market, it can be placed anywhere on any edge of the screen
Hey, thanks. not bad but not exactly what I was looking for. I have an older generic crap-tab running 2.2, it has only one hard button and all the buttons are on the status bar at the top let of the screen. I really like that and was hoping to be able to do it here. maybe it's not possible but I can't see why. it's a good place for a few buttons, they are out of the way and such. I am wondering also if there is a way to disable the hard buttons on the A7 because somtimes I accidently activate them "sliding" a bit off the screen.
What you are describing is just a status bar modification. It is unique to that particular device, because it involves heavy modification of the Google framework library.
ytain

[Q] Reverse Portrait and Reverse Landscape Mode Support?

Hey, guys. Quick question.
Is there any way AT ALL that reverse portrait and reverse landscape could be achieved on the NST?
Let me know. Thanks,
ThirdNookie
Android 2.1 only supported two orientations.
Heck, B&N only really supported one!
I've looked at this. You'd need some system patches to get that working.
Right now, my system has so many patches on it already.
You could also arrange this on a per-application basis.
I've thought about throwing it on my reader app.
The question of buttons makes it a sticky question.
The original orientation key remapping remaps all the arrow keycodes.
We'd want to remap the scancodes, but only on the hard keys and not external keyboards.
Renate NST said:
Android 2.1 only supported two orientations.
Heck, B&N only really supported one!
I've looked at this. You'd need some system patches to get that working.
Right now, my system has so many patches on it already.
You could also arrange this on a per-application basis.
I've thought about throwing it on my reader app.
The question of buttons makes it a sticky question.
The original orientation key remapping remaps all the arrow keycodes.
We'd want to remap the scancodes, but only on the hard keys and not external keyboards.
Click to expand...
Click to collapse
Well, first thing would be getting the screen itself to rotate properly. Then we can worry about key remappings.
I'm here, but I'm not on my regular development system right now.
I'll take a peek at the rotation stuff when I am.

One hand use

Hi!
I'd like to know if anybody actually uses Samsung's features in order to help using the phone with one hand?
I myself make only use of the (not convincingly thought through) gesture which allows me to shrink the screen.
The assistant menu:
quite customisable, but much too big and slow for my taste.
Side key panel:
the other way round, quite comfortable to use, but nearly no customisation at all.
All in all I'd say lots of options, but not really thought through. What do you think?
Like you, I find the side key panel quite useful- eliminates the thumb stretching for the "back" button.
One handed input is also turned on & is mildly helpful for the dialer. Seemed to help a bit with continuous input on the keyboard as well, but ended up switching back to the stock Google keyboard I've grown so accustomed to.
Long pressing the recents key to bring up menus is also nice, though not specific to the Note 4.
Sometimes I use the shrink screen function that's when I'm to lazy to move my other hand haha
Sent from my SM-N910F using XDA Free mobile app
It's not just laziness. Sometimes you really need to do other things with your other hand (old school multi-tasking).
Holmegaard said:
Like you, I find the side key panel quite useful- eliminates the thumb stretching for the "back" button.
One handed input is also turned on & is mildly helpful for the dialer. Seemed to help a bit with continuous input on the keyboard as well, but ended up switching back to the stock Google keyboard I've grown so accustomed to.
Long pressing the recents key to bring up menus is also nice, though not specific to the Note 4.
Click to expand...
Click to collapse
I agree with everything you said. Still: I'm not too convinced from what the side key panel offers. If you could customise the side key panel the same way as the assistant menu, I'd totally go for it.
macmobile said:
I agree with everything you said. Still: I'm not too convinced from what the side key panel offers. If you could customise the side key panel the same way as the assistant menu, I'd totally go for it.
Click to expand...
Click to collapse
I seem to remember that there should be an app that mimics the one you can find in Ios. Anyway, there are several very good apps I use for 'one handed mode':
- button savior non root (you can find in in the google play store) which gives you back, home, recent, screen lock and lets you start both the dialer and the camera;
- lmt launcher (see at xda) which works very well if you are rooted and lacks some little features if you are not. You just have to remove tue superuser permission from the manifest file (which you can do with apk permission remover) and turn on accessibility and it'll work almost as a charm. I mean, it does not only allow you to mimic the hardware keys, it can start any app and any activity which does not require root. If you are rooted, it can do virtually anything;
- as a good replacement of lmt launcher, you can test pie control by Coolace (always in the google play store).
I mostly keep the note 4 in my left hand (though I am right handed) just because my 2 years experience with the note 2 has got me accustomed to writing with my right hand, while keeping the smartphone with the left one... so that I currently feel uncomfortable while holding the note with my dominant hand So, I feel the need to have virtual keys on the right side, since reaching the back button on the right side is not so easy (though my hands are normally sized) and the above mentioned apps are the most useful I have found.
Funny, you actually named some very important apps I already use on my phone except for the lmt launcher. Could be that I thought there isn't anything to gain from if you're not rooted. Going to give it a try though. Thank you! Still I don't get it, why Samsung's Touchwiz doesn't offer better solutions? They could do it so easily.
No doubt macmobile, some customization options would be nice. The big phone trend isn't going away, so I'm hoping that more options for easing one-handed use are in the pipeline. Samsung would do well to lead the way, given their investment in the "phablet" space.
macmobile said:
Funny, you actually named some very important apps I already use on my phone except for the lmt launcher. Could be that I thought there isn't anything to gain from if you're not rooted. Going to give it a try though. Thank you! Still I don't get it, why Samsung's Touchwiz doesn't offer better solutions? They could do it so easily.
Click to expand...
Click to collapse
I rooted every single phone or tablet before buying a Note 4 and now, though I miss the fun of flashing rom and mods, I think this phone has too many sensors which wouldn't be supported by an AOSP rom, while custom touchwiz roms aren't worth for me to give up to knox. Not much for the warranty loss, but more for the loss of the knox enviroment itself. So, since I don't want to root, I have got to look for work-arounds and I think there are many good apps.
Back on topic, imho Samsung has so far designed the best implementation for one hand usage, though it could be better. If you look at the nexus 6, it's just a big phone and the Iphone itself is just a (good) 5.5" phone which doesn't pay particular attention to single hand usage.
I agree with you both that phablets are very likely here to stay and that the current UI for single hand usage is at very early stage.
I just received the Note 4 with lollipop pre installed.
The one-handed operation (that I was using woth my note 3) has disappeared from settings!!!!!
WHY????
how to get it back?
Settings/Display and Wallpaper/One-handed operation
Samsung screwed one thing about One handed operation: there is no separate setting for dialing keyboard and QWERTY keyboard, just like it was on my previous Note II.
I wish I could set smaller dialpad, but retain full QWERTY, which is not the option any more.
When set one handed operation ON, samsung keyboard is just too small to me.

Categories

Resources