Skip to content

Send Fn scancode to OS on press and release #20

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

Closed
wants to merge 1 commit into from

Conversation

smumriak
Copy link

@smumriak smumriak commented Nov 3, 2022

Proposed change implements return of EC_SUCCESS from keyboard_scancode_callback on press and release of Fn key. This is needed in order to send the the scancode to OS.
This is primarily quality of life change since it would allow the OS to bind Fn key to some other modifier. Similar functionality exists on macOS for Apple Macbooks. From personal experience I've found remapping of Fn to Ctrl extremely useful, as it allows my muscle memory to work similarly on both Framework and Macbook laptops.
I am not convinced that his commit is enough tho, since the Fn hotkeys are technically sending completely different scancoded for actions (think of Home/End/PgDown/PgUp). OS might recognize those as used while the bound modifier is pressed. The obvious solution would be to send three scancodes in a row: release Fn, hotkey scancode, press Fn. I would expect EC firmware implement this on its own, but have not verified that yet.
Feedback is very welcome

@github-actions
Copy link

github-actions bot commented Nov 3, 2022

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@smumriak
Copy link
Author

smumriak commented Nov 3, 2022

I have read the CLA Document and I hereby sign the CLA

kiram9 added a commit that referenced this pull request Nov 3, 2022
@smumriak
Copy link
Author

smumriak commented Nov 5, 2022

Clising this PR for two reasons:

  • linux is not able to understand scancode of 0x00ff, at least not for now
  • CrOS EC does not pass 0x00ff scancode to OS because it can not translate it. From EC's point of view it's unknown scancode that does not belong to any known scancode set

Much more changes needed to enable aforementioned behavior.

@smumriak smumriak closed this Nov 5, 2022
@github-actions github-actions bot locked and limited conversation to collaborators Nov 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant