# Has anyone gotten ShapeShifter + TopsyTurvy to play nice together?

**URL:** <https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904>\
**Category:** Programming\
**Tags:** plugin\
**Created:** [December 29, 2017, 7:59pm UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904 "2017-12-29T19:59:56Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![So8res](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/so8res/32/545_2.png) [@So8res](https://community.keyboard.io/u/So8res)\
**Post date:** [December 29, 2017, 7:59pm UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904/1 "2017-12-29T19:59:56Z")

</div>

My goal is to have a key that types “!” when pressed unshifted, and “#” when pressed shifted. (I also want a few other key pairings like this.) I was hoping that using TopsyTurvy and ShapeShifter together could make this happen, but it didn’t seem to work – I can make a key that types “!” when pressed, but it types “1” when shift-pressed. (Well, [a whole bunch of "1"s](https://community.keyboard.io/t/trouble-with-topsyturvy/903), actually, but that’s a separate issue).

Does anyone have an idea for how I can make a key that types “!” when pressed and “#” when shift-pressed?

Bonus points if the technique allows me to make the actual 1 key execute a macro when shift-pressed, though I’m willing to compromise on that front.

---

<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:** [December 29, 2017, 9:21pm UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904/2 "2017-12-29T21:21:53Z")

</div>

I haven’t written it yet, but I will probably get a plugin finished that will do exactly what you want (including the macro) sometime next month.

---

<div class="post-metadata">

**Author:** ![nikita](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/nikita/32/781_2.png) [@nikita](https://community.keyboard.io/u/nikita)\
**Post date:** [December 29, 2017, 11:22pm UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904/3 "2017-12-29T23:22:51Z")

</div>

The ModifierLayers plugin I have was designed to do exactly this: [https://github.com/nikitakit/Kaleidoscope-ModifierLayers](https://github.com/nikitakit/Kaleidoscope-ModifierLayers)

---

<div class="post-metadata">

**Author:** ![lydell](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/lydell/32/692_2.png) [@lydell](https://community.keyboard.io/u/lydell)\
**Post date:** [December 30, 2017, 4:16pm UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904/4 "2017-12-30T16:16:14Z")

</div>

I don’t use any of those plugins. Instead, what I did was:

1. Duplicate all your layers (where you’d like to be able to use Shift as a modifier). Add `_SHIFT` (or something) at the end of the layer names.
2. Add `LSHIFT()` around all keys in the `*_SHIFT` layers.
3. Replace some keys in the `*_SHIFT` layers, to make them type what you want.
4. Replace `Key_LeftShift` and `Key_RightShift` with `ShiftToLayer(FOO_SHIFT)` everywhere, so that the “shift” keys shifts to the appropriate `*_SHIFT` layer instead of sending an actual Shift keypress to the OS.
5. Add a `Key_LeftShift` somewhere, which can be used for shift-clicking.

Here are my layers:

> <https://github.com/lydell/Model01-Firmware/blob/18b6b4cbabe69db58eaf283549de743689e0e9e3/Model01-Firmware.ino#L150-L240>

See also:

> [@Some funky shift customizations I’d like to make slight\_smile](https://community.keyboard.io/t/some-funky-shift-customizations-i-d-like-to-make/716/12):
>
> I’ve implemented the above idea now: [https://github.com/lydell/Model01-Firmware/commit/5d9632022889eb54d62db3925f49b139b2becd33](https://github.com/lydell/Model01-Firmware/commit/5d9632022889eb54d62db3925f49b139b2becd33) Seems to be working great so far. Just remember that if you need to hold down shift for real, you need to hold down fn+shift.

---

<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:** [December 30, 2017, 5:44pm UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904/5 "2017-12-30T17:44:30Z")

</div>

The trouble with that approach is that you can’t use `shift` in combination with a pointing device.

---

<div class="post-metadata">

**Author:** ![iank](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/iank/32/815_2.png) [@iank](https://community.keyboard.io/u/iank)\
**Post date:** [December 31, 2017, 2:00am UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904/6 "2017-12-31T02:00:49Z")

</div>

What does shift + mouse do for you? Afaik, on gnu/linux, in firefox, shift+left click highlights to where the cursor was last, which I rarely use and would happily press a different key than normal to do. It appears to do nothing for right and middle click. I have no idea of any other functionality. This seems like a trivial inconvenience.

---

<div class="post-metadata">

**Author:** ![nikita](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/nikita/32/781_2.png) [@nikita](https://community.keyboard.io/u/nikita)\
**Post date:** [December 31, 2017, 3:40am UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904/7 "2017-12-31T03:40:14Z")

</div>

@iank In addition to shift+mouse (which is used for graphics applications like Inkscape, as well as games), the other issue with that approach is that now shift won’t work properly with other layers, e.g. a “function layer” activated by pressing the fn key. You can work around this, but it becomes harder if the function layer is partially transparent (e.g. if it’s only supposed to affect the left half of the keyboard, but not the right half).

My personal usecase involves using many additional layers, which is why I decided to make a plugin. Of course your needs may be different.

Edit: shift-click is also used for multi-item selections in a gui file manager or similar apps.

---

<div class="post-metadata">

**Author:** ![lydell](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/lydell/32/692_2.png) [@lydell](https://community.keyboard.io/u/lydell)\
**Post date:** [January 3, 2018, 7:36am UTC](https://community.keyboard.io/t/has-anyone-gotten-shapeshifter-topsyturvy-to-play-nice-together/904/8 "2018-01-03T07:36:53Z")

</div>

Yes, my solution is a hack which brings its own problems (with workarounds). But it’s an approach to consider.
