Send Fn scancode to OS on press and release #20
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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