-
Notifications
You must be signed in to change notification settings - Fork 964
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 keymappings for several utility functions #3536
Conversation
Excellent, thank you!! I will test this change this evening after work, assuming someone else doesn't beat me to it 🙂
Tony Good
…________________________________
From: Thomas Göttgens ***@***.***>
Sent: Tuesday, April 2, 2024 08:51
To: meshtastic/firmware ***@***.***>
Cc: tropho23 ***@***.***>; Mention ***@***.***>
Subject: [meshtastic/firmware] Mute external notifications from keyboard (PR #3536)
* map fn+m to mute and unmute the external notification module
* map fn+t to be an alternative for the TAB key
for @tropho23<https://github.com/tropho23> with ❤️
________________________________
You can view, comment on, or merge this pull request online at:
#3536
Commit Summary
* 2e26efe<2e26efe> - map fn+m to mute and unmute the external notification module
File Changes
(3 files<https://github.com/meshtastic/firmware/pull/3536/files>)
* M src/modules/CannedMessageModule.cpp<https://github.com/meshtastic/firmware/pull/3536/files#diff-caf0a45c5c8826739fb7f9d175b3867d8a7c7a2d8709457f96a8c271a10ddcb8> (15)
* M src/modules/ExternalNotificationModule.cpp<https://github.com/meshtastic/firmware/pull/3536/files#diff-8f0f833122f0577cc7d091d7954100cba2e48c1208d118f5830f68417eace402> (4)
* M src/modules/ExternalNotificationModule.h<https://github.com/meshtastic/firmware/pull/3536/files#diff-9ff83e2a3de8cfc6dbf0dfb19a3242ee3058939b69c33d00ec005e5c4ba33c96> (5)
Patch Links:
* https://github.com/meshtastic/firmware/pull/3536.patch
* https://github.com/meshtastic/firmware/pull/3536.diff
—
Reply to this email directly, view it on GitHub<#3536>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQ7GUPWS2UE5BQIAWES5UBLY3KSWXAVCNFSM6AAAAABFTKTAH6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGIZDANBUHAYDIMA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
src/modules/CannedMessageModule.cpp
Outdated
@@ -397,6 +398,7 @@ int32_t CannedMessageModule::runOnce() | |||
} | |||
break; | |||
case 0x09: // tab | |||
case 0x91: // fn+t for T-Deck that doesn't have a tab key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
T-Deck doesn't have a fn key either, it has an alt key.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alt is mapped to Fn in the t-deck driver... Since cardkb does not have an alt key and sym+t is / (forward slash)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm. I tried this on my T-Deck and the alt + t did nothing for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, because of the other bug... whitelist was not updated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Gotcha... I'll try again when the artifacts are ready.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tried the artifact from the latest change and alt+t still doesn't work as tab for the T-Deck 😞
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
anything helpful in debug log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nada... It doesn't seem the alt is engaging the fn aspect because all it's doing is typing 't'.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a look at the 'probably used' ESP32-C3 keyboard firmware of the T-Deck and it's nothing like the cardkb at all. It looks more like the code used in the BB10 Keyboard, where you have to manage the alt and sym presses yourself. When you press alt, then t, what scancode(s) is/are printed in the debug log?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think that level of logging is turned on as I don't see the scan code.
DEBUG | 14:24:30 73 [cardKB] Canned message event any key pressed
DEBUG | 14:24:30 73 [cardKB] showing standard frames
DEBUG | 14:24:30 73 [cardKB] Module wants a UI Frame
DEBUG | 14:24:30 73 [cardKB] Showing 1 module frames
DEBUG | 14:24:30 73 [cardKB] Total frame count: 104
DEBUG | 14:24:30 73 [cardKB] Added modules. numframes: 1
DEBUG | 14:24:30 73 [cardKB] Finished building frames. numframes: 8
These changes don't work for me; compiled and uploaded to RAK4631 with CardKB, RAK buzzer, external vibramotor and Fn+M (or pressing Fn so the onboard Neopixel flashes green, then pressing M) does not disable the External Notifications module. Same issue with Fn+T, which does not invoke the channel select menu like pressing TAB does. I also tried changing the key scan codes to see if different ones would work, but they did not. |
2e26efe
to
61d7ef1
Compare
"== true", right? or you will set it to true... |
The changes from today make Fn+M work to toggle notifications, thanks! I did notice that once I press M (after pressing Fn and see the green LED flashing to include the function key was pressed), notifications are muted but also the device thinks I am starting to type a message, as the message input screen is displayed as if I typed a regular letter. If it does not do that it will work perfectly :) |
That's a simple fix, just add "runState = CANNED_MESSAGE_RUN_STATE_INACTIVE;" on lines 429 and 433 so that it keeps the text entry to not activate. @caveman99 |
- map fn+t to be an alternative for the TAB key
4e27351
to
3dee22b
Compare
All of these work perfectly, thank you @caveman99 and @HarukiToreda |
Also I will submit a feature request to add some screen 'toast' (popup) messages that indicate what the hotkey did. |
Are we good to merge this one now? |
From my testing, all functions work. I believe it's good to merge. |
Can we add all the keymappings into the documentation, e.g. here: |
Probably not best there as these are specific to the CardKB. They do not work on the T-Deck. At least I've been unable to make them work. |
I am running firmware 2.3.4 and the ALT + KEY on the T-Deck doesn't work Only ALT-B for the keyboard backlight. |
If I recall correctly, the ALT+key combos for T-Deck cannot be mapped by users so we must consider SYM+ combos. This presents an issue since the SYM key is used to enter symbols, and every mappable key already has a symbol that is needed. If only the T-Deck keyboard wasn't so limited...
Tony Good
…________________________________
From: GeneralZodGit ***@***.***>
Sent: Wednesday, April 17, 2024 08:44
To: meshtastic/firmware ***@***.***>
Cc: tropho23 ***@***.***>; Mention ***@***.***>
Subject: Re: [meshtastic/firmware] Add keymappings for several utility functions (PR #3536)
I am running firmware 2.3.4 and the ALT + KEY on the T-Deck doesn't work Only ALT-B for the keyboard backlight.
—
Reply to this email directly, view it on GitHub<#3536 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AQ7GUPU2EFU66GR4OXPKBELY5ZVEDAVCNFSM6AAAAABFTKTAH6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDANRRGE3TKNZXHA>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
for @tropho23 with ❤️