Skip to content
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

Try enabling "send with OK" in Messenger #244

Closed
sspanak opened this issue Apr 25, 2023 · 1 comment · Fixed by #358
Closed

Try enabling "send with OK" in Messenger #244

sspanak opened this issue Apr 25, 2023 · 1 comment · Fixed by #358
Assignees
Labels
enhancement New feature or request

Comments

@sspanak
Copy link
Owner

sspanak commented Apr 25, 2023

FB Messenger does not natively support sending messages with OK or ENTER key. However, it may be possible to hack it by doing:

  1. right-right (select the send button)
  2. send OK
  3. left-left (go back to the text field)

Phase 1 (code cleanup):

  • Add these new functions: InputField.sendKeyPress(int keyCode) and InputField.sendKeyCombo(List<Integer> keyCodes)
  • Then replace all sendKeyDownUp() calls with sendKeyPress().
  • Move the current performOK to InputField as well.

Phase 2 (the hack):

  • Create AppHacks.getOkCombo(String packageName). It will analyze the package name and return the correct combo or simply null
  • InputField.performOK will use AppHacks.getOkCombo(). If it returns a combo it will pass it to sendKeyCombo() otherwise, it will run the current routine (probably, defaultOKCombo()).

If it turns out there are too many difficulties along the way, just let it be.

@sspanak
Copy link
Owner Author

sspanak commented Aug 24, 2023

While working on #286 and #353 a much simple AppHacks class emerged, very different from the original idea. Nevertheless, it works just fine and it allows for even broader hacks support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant