# How do I swap '-' and '\_' other characters?

**URL:** https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886
**Category:** Help and Getting Started
**Created:** [May 22, 2019, 11:15pm UTC](https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886 "2019-05-22T23:15:54Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Plotnus](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/plotnus/32/2778_2.png) [@Plotnus](https://community.keyboard.io/u/Plotnus)
#### Post date: [May 22, 2019, 11:15pm UTC](https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886/1 "2019-05-22T23:15:54Z")

</div>

Hello,

I want to swap `-` and `_`. I also want to move `?` to a function binding.

However, I have not found how to change the bindings for individual characters based on the shift modifiers, or how to make ‘?’ map to the function layer.

How can I go about accomplishing this?

---

<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: [May 23, 2019, 3:50am UTC](https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886/2 "2019-05-23T03:50:48Z")

</div>

There are two plugins that might help get you what you want — TopsyTurvy & ShapeShifter. One inverts the `shift` behaviour for specified `Key` values, the other changes the keycode produced when `shift` is applied.

TopsyTurvy should be able to swap `-` & `_` easily enough.

You can certainly put a key that produces `?` on some other layer, by using `LSHIFT(Key_Slash)` (assuming you want to be able to type it without also holding shift). With ShapeShifter, you could get that key to produce another shifted symbol when shift is held.

Even together, however, these two plugins don’t let you assign symbols completely independently to the shifted and unshifted states of a key, so you might not be able to get the keymap that you want. (I wanted total shift-dissociation, so I wrote my own version of Kaleidoscope to get it).

---

<div class="post-metadata">

### Author: ![mensore](https://avatars.discourse-cdn.com/v4/letter/m/9de0a6/32.png) [@mensore](https://community.keyboard.io/u/mensore)
#### Post date: [May 23, 2019, 3:51am UTC](https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886/3 "2019-05-23T03:51:59Z")

</div>

That is a really interesting question. I just opened Chrysalis and found the same thing as you, most (all?) of the shift modifier symbols are missing. I checked every menu to no avail. Perhaps this is something to be added to Chysalis in the future.

---

<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: [May 23, 2019, 12:10pm UTC](https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886/4 "2019-05-23T12:10:07Z")

</div>

I don’t think Chrysalis can do TopsyTurvy or ShapeShifter configuration, but that’s just a guess — @algernon could tell you for sure. The shifted symbols don’t appear because they don’t represent independent keycodes. I’ve only looked at Chrysalis briefly one time, so I’m not sure how to apply modifier flags to keymap entries there, but I’m sure you can do it.

---

<div class="post-metadata">

### Author: ![wrightgardner](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/wrightgardner/32/2758_2.png) [@wrightgardner](https://community.keyboard.io/u/wrightgardner)
#### Post date: [May 23, 2019, 2:20pm UTC](https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886/5 "2019-05-23T14:20:22Z")

</div>

I map the parens on my function layer for easy access without having to hold shift. Is this what you’re looking to do in Chrysalis?

 ![49%20AM](https://canada1.discourse-cdn.com/flex031/uploads/keyboard/original/2X/1/1f95a37eba2d7cef6e184d3b5c722549beab283e.png)

---

<div class="post-metadata">

### Author: ![Plotnus](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/plotnus/32/2778_2.png) [@Plotnus](https://community.keyboard.io/u/Plotnus)
#### Post date: [May 23, 2019, 8:04pm UTC](https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886/6 "2019-05-23T20:04:26Z")

</div>

I’m looking to have the `_` character when I don’t press shift and the `-` when I do. in addition to putting `?` on the functional layer.

basically I’d want to define a shift layer, and an FN layer. Unfortunately I couldn’t find the keycodes for `?`.

I guess the problem is that as a user I think in `character` not keycodes and shift modifiers and how `_` is really \<`-` + SHIFT\>. Basically what I think is that there is a series of bits that represent `-` or `_` so why deal with the keycodes? why not just create character maps and have overrides for the shift layer or something. This way I don’t have to redefine everything if I want to change things around because in the end, some series of bits represents a specific chacacter so just send out that series of bits and forget the keycodes.

With that said I am a new user and this way of working with may exist and I’m just unaware of it. I havn’t used Chrysalis or other keyboardio tools besides the arduino c files I edited to get dvorak.

Thank you to everyone for the replies so far… much appreciated.

---

<div class="post-metadata">

### Author: ![algernon](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/algernon/32/4404_2.png) [@algernon](https://community.keyboard.io/u/algernon)
#### Post date: [May 25, 2019, 6:15am UTC](https://community.keyboard.io/t/how-do-i-swap-and-other-characters/2886/7 "2019-05-25T06:15:29Z")

</div>

Moving `?` to the `Fn` layer is the easier part: it’s just `Shift+/`, which you should be able to set up in Chrysalis (if not, please open a GitHub issue, and we’ll fix it quick).

Swapping `-` and `_` is more complicated, due to how keyboards report to the host. You can use the [`TopsyTurvy`](https://github.com/keyboardio/Kaleidoscope/blob/master/doc/plugin/TopsyTurvy.md) plugin to swap these two: `#include <Kaleidoscope-TopsyTurvy.h>`, add `TopsyTurvy` to `KALEIDOSCOPE_INIT_PLUGINS`, and replace `Key_Slash` on your keymap with `TOPSY(Slash)`, and you should be good to go.
