# Using both alt flags on one key

**URL:** <https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370>\
**Category:** Kaleidoscope Internals\
**Tags:** question\
**Created:** [April 12, 2018, 8:44pm UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370 "2018-04-12T20:44:03Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [April 12, 2018, 8:44pm UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370/1 "2018-04-12T20:44:03Z")

</div>

Does anyone know of a case where it’s useful to send both left and right `alt` keycodes simultaneously? I’m curious because it looks like QMK and Kaleidoscope both use five flag bits for adding modifiers to keyboard keycodes, but while Kaleidoscope has four left mods and one for right `alt`, QMK uses four bits to encode the different modifiers and the fifth bit to indicate if the modifiers will be treated as right mods instead of left mods. This seems pretty much equivalent in almost all cases, unless there’s something that uses a combination of the two `alt` keys (i.e. `Alt` + `AltGr` + `X`). I’m just curious, and wondering if there is anything that would make use of that combination.

---

<div class="post-metadata">

**Author:** ![cal](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cal](https://community.keyboard.io/u/cal)\
**Post date:** [April 13, 2018, 2:07pm UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370/2 "2018-04-13T14:07:32Z")

</div>

IIRC, a small handful of games make the distinction.

Also, it would be worthwhile to check with the [Plover](http://www.openstenoproject.org/) community because steno might make use of a distinction between those keys.

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [April 13, 2018, 2:27pm UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370/3 "2018-04-13T14:27:28Z")

</div>

A _distinction_ between the two `alt` keys is a prerequisite for what I’m getting at (and certainly exists in many cases, even system-wide), but the core of my question is, “Can anyone think of a reason to have a keymap entry that uses _both_ `alt` modifier flags (on the same key)?”

Plover is another good suggestion; I hadn’t thought of that. However, since the whole point of a stenograph is to use few keys and rapid chording, I doubt very much that it makes sense to have dedicated special keys with modifier combos.

---

<div class="post-metadata">

**Author:** ![cal](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cal](https://community.keyboard.io/u/cal)\
**Post date:** [April 13, 2018, 9:16pm UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370/4 "2018-04-13T21:16:16Z")

</div>

Ah, okay.

In that case, yes I can think of a valid use for a `Alt`+`AltGr`+_x_ combo.

Given:

1. The `Alt` layer can be thought of as a second `Shift` layer.
2. The `AltGr` layer is typically used for glyphs which are not used in the native language of the user.
3. A Tolkien lore historian whose native language is English, but who needs to type Tengwar and Cirth.

In the above case, Tengwar goes on the `AltGr` layer, the `AltGr`+`Shift` layer is used for the less common Tengwar glyphs, and Cirth goes on the `AltGr`+`Alt` layer.

From a far more practical standpoint, I have used [Ukelele](http://scripts.sil.org/cms/scripts/page.php?item_id=ukelele) to do the same thing for my laptop (English on the base and `Shift` layers, Greek on the `AltGr` and `AltGr`+`Shift` layers, culminating in esoteric Unicode mathematical glyphs on the `AltGr`+`Alt` layer).

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [April 14, 2018, 2:04am UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370/5 "2018-04-14T02:04:00Z")

</div>

Thanks for the reply; that’s a bit of a custom configuration corner case, but still a possible reason to prefer the Kaleidoscope system to QMK’s mod flags.

As a followup question, do you see it as useful to be able to have an in-firmware layer where all (or nearly all) the keys have the `Alt` + `AltGr` modifier flags applied (so you could toggle a layer on and not need to hold modifier keys)? Or have you already done so (I’m not sure from reading your message)?

---

<div class="post-metadata">

**Author:** ![cal](https://avatars.discourse-cdn.com/v4/letter/c/f1d935/32.png) [@cal](https://community.keyboard.io/u/cal)\
**Post date:** [April 14, 2018, 9:05am UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370/6 "2018-04-14T09:05:19Z")

</div>

My above example was from before I discovered Kaleidoscope and QMK, so my usage of “layer” in said above example is Ukelele’s concept of a layer (have to hold down modifier key(s) to access that layer).

Using modifier keys to toggle a layer on/off would be far more user friendly.

---

<div class="post-metadata">

**Author:** ![Llamalland](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/llamalland/32/832_2.png) [@Llamalland](https://community.keyboard.io/u/Llamalland)\
**Post date:** [April 24, 2018, 1:54am UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370/7 "2018-04-24T01:54:35Z")

</div>

I know that the portable keyboard layout mod of autohotkey by default uses left and right alt to toggle between layouts, but that was mostly to avoid common shortcuts etc.

So not really, no. In fact my example would be a reason to avoid using both alt flags on one key if anything.

Maybe some odd layering for alt character codes using the numberpad? One alt gives you the regular alt character codes, both alts gives you access to your own custom ordering of character codes? You’d at least know that it probably wouldn’t cause any interference the way that it could with other modifiers (unless you have PKL), and even with monster hands like mine it’s very tricky to do on a normal layout keyboard (although holding both alts with the left hand does work but looks and feels as stupid as fuck), but it could be useful for ergonomic keyboards, and could be a case where single key double alt would be useful.

(on reading, it’s a pretty similar case to what @cal was saying)

---

<div class="post-metadata">

**Author:** ![merlin](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/merlin/32/3416_2.png) [@merlin](https://community.keyboard.io/u/merlin)\
**Post date:** [April 24, 2018, 2:23am UTC](https://community.keyboard.io/t/using-both-alt-flags-on-one-key/1370/8 "2018-04-24T02:23:26Z")

</div>

Thanks for the answer. I feel like I should point out that I wasn’t so much interested in what _could_ be done, theoretically, with both `alt` keycodes on the same key. After all, both QMK and Kaleidoscope have ways to configure a key with both `alt` codes on one key. The tradeoff that exists is that Kaleidoscope can have both `alt`s _and_ a printable keycodes on one key (QMK can’t), but QMK can have any of the other three right-side mods (but no left mods) _and_ a printable keycode on one key (Kaleidoscope can’t).

I was trying to decide which system I preferred in my experimental Kaleidoscope fork. So my real question, when I get right down to it, should have been, “Which of these two alternatives is less limiting, in general?” I’ve basically settled on using Kaleidoscope’s mod flags as slightly superior, but it’s still not obviously better.
