# Qukeys with more states

**URL:** <https://community.keyboard.io/t/qukeys-with-more-states/13537>\
**Category:** Programming\
**Created:** [May 22, 2025, 11:44pm UTC](https://community.keyboard.io/t/qukeys-with-more-states/13537 "2025-05-22T23:44:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kenobi](https://avatars.discourse-cdn.com/v4/letter/k/ed8c4c/32.png) [@kenobi](https://community.keyboard.io/u/kenobi)\
**Post date:** [May 22, 2025, 11:44pm UTC](https://community.keyboard.io/t/qukeys-with-more-states/13537/1 "2025-05-22T23:44:40Z")

</div>

Maybe this is a terrible idea. I’m trying to create a sort of universal modifier key that I can use to access multiple shortcuts - which have different modifiers. Let’s call the key [magic]. I currently have it programmed using qukeys, such that the primary key is space, and the secondary key is control.

- [magic] → space
- [magic]+[other key] → ctrl-[other key]

I want to also cram task-switcher functionality in there, in other words

- [magic] → space
- [magic]+tab → alt+tab
- [magic]+[any other key] → ctrl-[other key]

The kicker is that since this is the task switcher, it’s not sufficient to use a macro or magic-combo to just emit an “alt-tab” key event – the alt key has to look like it stays down, so I can push [magic]+tab+tab+tab to cycle through applications.

Any ideas how such a thing might be accomplished?

It seems a little similar to how qukeys works in that it buffers up the event and then decides what to do based on a subsequent event, only the result of the quantum key doesn’t just depend on whether another key was pressed, it also depends which key.
