FrameworkComputer / EmbeddedController

Embedded Controller firmware for the Framework Laptop
BSD 3-Clause "New" or "Revised" License
950 stars 64 forks source link

Send Fn scancode to OS on press and release #20

Closed smumriak closed 2 years ago

smumriak commented 2 years ago

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[bot] commented 2 years ago

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

smumriak commented 2 years ago

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

smumriak commented 2 years ago

Clising this PR for two reasons:

Much more changes needed to enable aforementioned behavior.