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

Oneshot active utility functions #442

Closed
TD22057 opened this issue Jun 25, 2016 · 7 comments · Fixed by #4198
Closed

Oneshot active utility functions #442

TD22057 opened this issue Jun 25, 2016 · 7 comments · Fixed by #4198
Assignees

Comments

@TD22057
Copy link

TD22057 commented Jun 25, 2016

This is an enhancement request to add functions to control oneshot behavior and add an action macro ACTION_MODS_ONESHOT_TOGGLE() to call the toggle function. I'm planning on implementing this feature and figured this issue could be used for any discussion about whether you want a pull request for this or not.

oneshot_toggle()
oneshot_enable()
oneshot_disable()

If oneshot is disabled, then any key marked as oneshot behaves normally. When oneshot is enabled (the default), keys marked as oneshot work that way. It does not turn any modifier into a oneshot modifier - only mods marked that way in the action map will work as oneshots. This just allows that behavior to be turned off if desired.

This makes it easy to experiment in a keymap with oneshot modifiers. They can be all be declared as oneshot mods and another key can be designated to turn the oneshot behavior on and off. So deciding to use oneshots or not is a software switch controlled from the keyboard instead of requiring a change to the firmware.

I have a pull request in at TMK for this but it doesn't include oneshot layer support since that was never merged in there. tmk/tmk_keyboard#350

Depending one what you think, this could be done in a two-stage pull request. Part 1) would implement the functions listed above so this capability exists. Hopefully that's not very controversial. Part 2) would implement an action macro to make it easy to call the toggle function and include in a keyboard map. That's only a convenience and uses up bits in the action struct so that could be left off. Obviously that requires anyone using this to do a bit more coding in their keymap to call the toggle functions.

@TD22057 TD22057 changed the title Oneshot active utilityfunctions Oneshot active utility functions Jun 25, 2016
@jackhumbert
Copy link
Member

Nice. I like this - I would merge it! We are trying to reimplement things in the new process_record format (only in QMK), though. If you'd like to do that for this, that would be awesome too!

@TD22057
Copy link
Author

TD22057 commented Jun 25, 2016

Where can I find info on the process_record format? I see a few calls to that function but they seem to overlap with the one shot code.

@jackhumbert
Copy link
Member

You can see the individual ones setup here - they're all called from quantum.c. I just started working toward this today though :)

@drashna
Copy link
Member

drashna commented Oct 21, 2018

@TD22057 Was there still interest in doing this? Did you want to do this?

@TD22057
Copy link
Author

TD22057 commented Oct 22, 2018

Feel free to grab the PR from TMK and update it. I haven't had time to do any keyboard work in quite awhile.

@stale
Copy link

stale bot commented Nov 21, 2019

This issue has been automatically marked as resolved because it has not had activity in the last 90 days. It will be closed in the next 30 days unless it is tagged properly or other activity occurs.

@stale stale bot added the solved label Nov 21, 2019
@drashna drashna added to do and removed solved labels Nov 21, 2019
@drashna drashna self-assigned this Nov 21, 2019
@drashna drashna added in progress and removed to do labels Dec 13, 2019
@drashna drashna added core and removed in progress labels Jan 12, 2021
@drashna
Copy link
Member

drashna commented Mar 1, 2021

Added.

@drashna drashna closed this as completed Mar 1, 2021
BlueTufa pushed a commit to BlueTufa/qmk_firmware that referenced this issue Aug 6, 2021
* Add default keymap for Quantrik Kyuu

* Add default keymap for Qwertyydox rev1

* Update Qwerttydox rev1 keymap for upstream changes
jiaxin96 pushed a commit to Oh-My-Mechanical-Keyboard/qmk_firmware that referenced this issue Oct 18, 2023
* add reviung53 vial files

* add d45 directory from qmk

* remove reviung53 files not on vial branch

* add vial specific files

* fix config and rules conflicts

* prettify

* update lighting

* Update keyboards/kbdfans/d45/config.h

Co-authored-by: Less/Rikki <[email protected]>

* migrate from rules.mk and config.h to info.json

---------

Co-authored-by: Less/Rikki <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants