keymapperorg / KeyMapper

An Android app that change what the buttons do on your devices!
http://docs.keymapper.club
GNU General Public License v3.0
1.14k stars 156 forks source link

Remapping modifier keys breaks existing modifier key shortcuts #753

Closed lucabalsanelli closed 2 years ago

lucabalsanelli commented 3 years ago

Developer TODO (don't remove)

Describe the bug SHIFT+LARROW (ie select previous character) , SHIFT+RARROW (ie select next character) not working if there are TRIGGER/ACTION pairs involving SHIFT. Notice that installing KeyMapperKeyboard does not change the problem.

To Reproduce Steps to reproduce the behavior:

Expected behavior Previous or next character to be selected as if any other keyboard other than KeyMapper Basic Input is chosen as Input Keyboard or as if pairs involving SHIFT not present or disabled.

Smartphone (please complete the following information):

Additional context 2.3.0 Beta 4 affected and also 2.2.0

REPORT

key_mapper_report_20210729-124151.zip

GL513 commented 3 years ago

Just LG G7 or LG G7 ThinQ? My brother has an LG G7 ThinQ, so i can ask him to test it on that as well.

lucabalsanelli commented 3 years ago

LG G7 ThinQ. Notice I'm facing the issue with an external mini keyboard (Rii i4 Bluetooth physical mini keyboars with Italian layout), but I guess it's not connected with the keyboard itself. Probably any other physical keyboard with arrows would replicate the issue.

I tried to create a trigger/action pair involving CTRL+2 mapping to 'b' and CTRL+LARROW (move cursor to beginning of line) kept on working. Same for ALT+LARROW.

GL513 commented 3 years ago

LG G7 ThinQ. Notice I'm facing the issue with an external mini keyboard (Rii i4 Bluetooth physical mini keyboars with Italian layout), but I guess it's not connected with the keyboard itself. Probably any other physical keyboard with arrows would replicate the issue.

I tried to create a trigger/action pair involving CTRL+2 mapping to 'b' and CTRL+LARROW (move cursor to beginning of line) kept on working. Same for ALT+LARROW.

Mabey try mapping it to your volume buttons, and see if you get the same result. I have a generic bluetooth keyboard, and i have to take it apart to see the model, but i get different results with the keyboard compared to the volume buttons. Since your phone is around 3 or 4 years old (the manufacturing/build date) it might preform differently than a newer phone. Also, if this is a bug on the device end, not the app itself, it might never get fixed, as LG ended their phone line, and only supports bug/security fixes, which i presume will rarely come out, like mabey once every 6 months to a year. Again, ill test this woth my brother's phone.

lucabalsanelli commented 3 years ago

A workaround would be to map some other combination involving LARROW but not SHIFT to a 'Select previous character' action (same for RARROW and 'Select next character'). The problem is that I cannot find a way to do that. Among the Actions -> Other -> Keyboard I find CUT, COPY, PASTE and SELECT WORD AT CURSOR. The latter isn't the right thing (it selects the whole word plus following whitespace) since I just want to select the previous or next character, possibly repeatedly with a single long press until I release the keys.

I dont see how it can be a bug on the phone side but everything is possible. I should try using another bluetooth keyboard to see what happens if I find one to borrow.

lucabalsanelli commented 3 years ago

Today I tried with another phone, precisely

Xiaomi Mi 10T M2007J3SY MIUI Global 12.0.11 Stable Android 10 QKQ1.200419.002 patch 2

and the issue it's exactly as with my LG G7 Thinq as described above.

Notice that I tried also creating a Trigger/Action pairr involving CTRL+A printing 'b' and the other functionalities involving CTRL (like copy and paste) stayed functional. The same does not happen with SHIFT.

sds100 commented 3 years ago

keymapper-2.4.0-alpha-debug.zip

@lucabalsanelli Can you try this apk? I think it should have fixed it

lucabalsanelli commented 3 years ago

Sure I will, give me a couple of days more.

Cheers, Luca

On Fri, 1 Oct 2021 at 12:28, Seth Schroeder @.***> wrote:

keymapper-2.4.0-alpha-debug.zip https://github.com/sds100/KeyMapper/files/7266476/keymapper-2.4.0-alpha-debug.zip

@lucabalsanelli https://github.com/lucabalsanelli Can you try this apk? I think it should have fixed it

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sds100/KeyMapper/issues/753#issuecomment-932110927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIIOMQQJL7YI2HPQ4TMLQKTUEWELRANCNFSM5BGHUOZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Luca Balsanelli

lucabalsanelli commented 3 years ago

I'm sorry to tell you that '2.4.0 alpha debug' is not working.

Exact same behaviour as before.

On Mon, Oct 4, 2021, 15:58 Luca Balsanelli @.***> wrote:

Sure I will, give me a couple of days more.

Cheers, Luca

On Fri, 1 Oct 2021 at 12:28, Seth Schroeder @.***> wrote:

keymapper-2.4.0-alpha-debug.zip https://github.com/sds100/KeyMapper/files/7266476/keymapper-2.4.0-alpha-debug.zip

@lucabalsanelli https://github.com/lucabalsanelli Can you try this apk? I think it should have fixed it

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sds100/KeyMapper/issues/753#issuecomment-932110927, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIIOMQQJL7YI2HPQ4TMLQKTUEWELRANCNFSM5BGHUOZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

-- Luca Balsanelli

sds100 commented 2 years ago

@lucabalsanelli Okay, so there is already a solution to this problem and it is not obvious, even to me. πŸ˜‚ You need to turn on this option for the trigger keys that are modifier keys (ctrl, shift etc). I will change the app so it automatically turns this option on for modifier keys and show a brief explanation of why it is necessary. Would renaming it to "do not remap" be better? If this app was designed specifically for keyboards then this option wouldn't exist and it would be handled automatically.

Screenshot_20211107-141215_Key_Mapper_Debug

sds100 commented 2 years ago

Can you confirm that this fixes your issues?

lucabalsanelli commented 2 years ago

Happy to announce it's working.

More than a rename, I would add an explanation on why "do not override default action" on a single key of a pair may be necessary.

It never crossed my mind to even try because what I wanted to do is exactly the opposite, that is: override default action.

Regarding the app not being designed with keyboards in mind, I am going to think about it a bit and open some feature requests about handling and sharing presets and bunch editing lot of pairs. The app should become a little more convenient to use not just for the single casual remap.

On Sun, Nov 7, 2021, 14:18 Seth Schroeder @.***> wrote:

Can you confirm that this fixes your issues?

β€” You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/sds100/KeyMapper/issues/753#issuecomment-962609176, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIIOMQQBFGFNNRFEWLLG7ALUKZ4CZANCNFSM5BGHUOZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub.

sds100 commented 2 years ago

Yeah I totally agree, please make those feature requests. It took me a while to figure out this issue because if you want to create key maps with modifier keys then Key Mapper must NOT override the modifier keys. Otherwise it breaks the other modifier keyboard shortcuts. I try to make Key Mapper automatically guess what you are trying to do but a lot of things still need to be configured yourself, which is a "feature" but also makes it more difficult to do simple things than if the app was specialised for a particular task.

sds100 commented 2 years ago

fixed