# Remapping keys?

**URL:** <https://community.keyboard.io/t/remapping-keys/268>\
**Category:** Help and Getting Started\
**Created:** [July 23, 2017, 5:17am UTC](https://community.keyboard.io/t/remapping-keys/268 "2017-07-23T05:17:50Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 23, 2017, 5:17am UTC](https://community.keyboard.io/t/remapping-keys/268/1 "2017-07-23T05:17:50Z")

</div>

Is there an easy way to remap keys on the Model 01? I just received my PVT model, and right now the choices for the thumb keys are driving me to frustration. I’d like to move around where shift, cmd, etc are placed.

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jesse/32/361_2.png) [@jesse](https://community.keyboard.io/u/jesse)\
**Post date:** [July 23, 2017, 5:41am UTC](https://community.keyboard.io/t/remapping-keys/268/2 "2017-07-23T05:41:52Z")

</div>

Right now, the way to change the keymapping on the device is to reflash the firmware after tweaking the keymap.

> **[keyboardio/Model01-Firmware](https://github.com/keyboardio/Model01-Firmware)**
>
> The "standard" Keyboardio Model 01 Firmware sketch. - keyboardio/Model01-Firmware

Alternatively, on a Mac, Karabiner is a low-effort solution for remapping.

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 23, 2017, 5:55am UTC](https://community.keyboard.io/t/remapping-keys/268/3 "2017-07-23T05:55:04Z")

</div>

Thanks for the speedy reply! I must admit I have FUD around flashing the firmware with changes, even though I think that’s probably what I want to do long-term. I’ll give Karabiner a go, since I’m Mac-based.

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jesse/32/361_2.png) [@jesse](https://community.keyboard.io/u/jesse)\
**Post date:** [July 23, 2017, 5:57am UTC](https://community.keyboard.io/t/remapping-keys/268/4 "2017-07-23T05:57:28Z")

</div>

Flashing firmware ought to be safe and easy. We’ve got a bunch of safeguards to protect you from hurting yourself.

Also, I happen to know that you’re local, so if you were to run into trouble, I could lay hands on 😉

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 23, 2017, 4:07pm UTC](https://community.keyboard.io/t/remapping-keys/268/5 "2017-07-23T16:07:23Z")

</div>

Is the correct way forward to change the values in this block and reflash? [https://github.com/keyboardio/Model01-Firmware/blob/master/Model01-Firmware.ino#L68](https://github.com/keyboardio/Model01-Firmware/blob/master/Model01-Firmware.ino#L68)

---

<div class="post-metadata">

**Author:** ![Simon-Claudius](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/simon-claudius/32/493_2.png) [@Simon-Claudius](https://community.keyboard.io/u/Simon-Claudius)\
**Post date:** [July 23, 2017, 5:21pm UTC](https://community.keyboard.io/t/remapping-keys/268/6 "2017-07-23T17:21:33Z")

</div>

Hey @phildini. I’m currently working on our GUI keymap editor for Kaleidoscope. I can’t yet say when it will be usable, but we’re certainly aiming to release a solid version until the mass produced units ship.

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jesse/32/361_2.png) [@jesse](https://community.keyboard.io/u/jesse)\
**Post date:** [July 23, 2017, 6:13pm UTC](https://community.keyboard.io/t/remapping-keys/268/7 "2017-07-23T18:13:17Z")

</div>

> [@phildini](#):
>
> Is the correct way forward to change the values in this block and reflash?

Yes! That’s it exactly.

---

<div class="post-metadata">

**Author:** ![arley](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/arley/32/56_2.png) [@arley](https://community.keyboard.io/u/arley)\
**Post date:** [July 23, 2017, 8:37pm UTC](https://community.keyboard.io/t/remapping-keys/268/8 "2017-07-23T20:37:34Z")

</div>

Is it going to be possible to make “layers”? I was thinking I’d use the “any” and “butterfly” keys to raise and lower.

---

<div class="post-metadata">

**Author:** ![james.nvc](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/james.nvc/32/54_2.png) [@james.nvc](https://community.keyboard.io/u/james.nvc)\
**Post date:** [July 23, 2017, 8:46pm UTC](https://community.keyboard.io/t/remapping-keys/268/9 "2017-07-23T20:46:07Z")

</div>

I’ve been looking at [@algernon’s layout](https://github.com/algernon/Model01-sketch) to figure out the more advanced stuff like layers.

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 23, 2017, 11:24pm UTC](https://community.keyboard.io/t/remapping-keys/268/10 "2017-07-23T23:24:33Z")

</div>

Yeah I downloaded and built Chrysalis but didn’t see any options for key remapping. Did I miss something?

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 23, 2017, 11:49pm UTC](https://community.keyboard.io/t/remapping-keys/268/11 "2017-07-23T23:49:00Z")

</div>

When I try to run the make script I get

```
Makefile:12: /Users/phildini/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin/build/*.mk: No such file or directory
make: *** No rule to make target `/Users/phildini/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin/build/*.mk'. Stop.

```

It looks like the Makefile isn’t correctly picking up the Darwin nature of my mac, and if I change the path in the makefile there’s a child Makefile that tries to pull in the linux version of arduino… is there a install pre-req?

---

<div class="post-metadata">

**Author:** ![Simon-Claudius](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/simon-claudius/32/493_2.png) [@Simon-Claudius](https://community.keyboard.io/u/Simon-Claudius)\
**Post date:** [July 23, 2017, 11:50pm UTC](https://community.keyboard.io/t/remapping-keys/268/12 "2017-07-23T23:50:00Z")

</div>

No, you didn’t miss anything. The keymap editor is not in there, yet. I’m currently working on that. We are going to move to another frontend framework and I’m not entirely sure whether that will influence how quickly the keymap editor is going to be usable. Probably not, though.

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jesse/32/361_2.png) [@jesse](https://community.keyboard.io/u/jesse)\
**Post date:** [July 24, 2017, 12:38am UTC](https://community.keyboard.io/t/remapping-keys/268/13 "2017-07-24T00:38:38Z")

</div>

> [@phildini](#):
>
> When I try to run the make script I get  
> Makefile:12: /Users/phildini/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin/build/_.mk: No such file or directory  
> make: \*\*\* No rule to make target `/Users/phildini/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin/build/_.mk’. Stop.
> 
> It looks like the Makefile isn’t correctly picking up the Darwin nature of my mac, and if I change the path in the makefile there’s a child Makefile that tries to pull in the linux version of arduino… is there a install pre-req?

That’s weird. Can you try running the OS check in the makefile by hand?

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 24, 2017, 3:47am UTC](https://community.keyboard.io/t/remapping-keys/268/14 "2017-07-24T03:47:34Z")

</div>

Here’s me trying to figure it out.

```
SensitiveDependence:Kaleidoscope phildini$ UNAME_S := $(shell uname -s)
-bash: shell: command not found
-bash: UNAME_S: command not found
SensitiveDependence:Kaleidoscope phildini$ $(shell uname -s)
-bash: shell: command not found
SensitiveDependence:Kaleidoscope phildini$ uname -s
Darwin
```

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jesse/32/361_2.png) [@jesse](https://community.keyboard.io/u/jesse)\
**Post date:** [July 24, 2017, 4:12am UTC](https://community.keyboard.io/t/remapping-keys/268/15 "2017-07-24T04:12:30Z")

</div>

…I think I see it.

Can you try changing

BOARD\_HARDWARE\_PATH ?= $(HOME)/Arduino/hardware  
ifeq ($(UNAME\_S),Darwin)  
BOARD\_HARDWARE\_PATH ?= $(HOME)/Library/Arduino/hardware  
endif

To:

BOARD\_HARDWARE\_PATH ?= $(HOME)/Arduino/hardware  
ifeq ($(UNAME\_S),Darwin)  
BOARD\_HARDWARE\_PATH = $(HOME)/Library/Arduino/hardware  
endif

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 24, 2017, 4:17am UTC](https://community.keyboard.io/t/remapping-keys/268/16 "2017-07-24T04:17:31Z")

</div>

So I think there’s a number of things wrong as it stands, two that I know about.

1. The guide on [https://github.com/keyboardio/Kaleidoscope](https://github.com/keyboardio/Kaleidoscope) says to link to ~/Documents/Arduino, but the script says ~/Library/Arduino
2. The Makefile seems to not be detecting that I’m on a Darwin system.

I tried your changes, and I’m getting the same error.

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 24, 2017, 4:18am UTC](https://community.keyboard.io/t/remapping-keys/268/17 "2017-07-24T04:18:54Z")

</div>

Although once I made your change _and_ changed the path to `Documents`, it seems to be running. Will update here with progress.

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jesse/32/361_2.png) [@jesse](https://community.keyboard.io/u/jesse)\
**Post date:** [July 24, 2017, 4:21am UTC](https://community.keyboard.io/t/remapping-keys/268/18 "2017-07-24T04:21:59Z")

</div>

> [@phildini](#):
>
> So I think there’s a number of things wrong as it stands, two that I know about.
> 
> The guide on [GitHub - keyboardio/Kaleidoscope: Firmware for Keyboardio keyboards and other keyboards with AVR or ARM MCUs.](https://github.com/keyboardio/Kaleidoscope) says to link to ~/Documents/Arduino, but the script says ~/Library/Arduino

Documents is correct.

> [@phildini](#):
>
> The Makefile seems to not be detecting that I’m on a Darwin system.

I _think_ the issue is that the Makefile is just not correctly setting the env variable.

> [@phildini](#):
>
> I tried your changes, and I’m getting the same error.

Ack. So sorry.

If you just replace the whole file with:

> MAKEFILE\_PREFIX=keyboardio/avr/libraries/Kaleidoscope-Plugin/build  
> UNAME\_S := $(shell uname -s)
> 
> BOARD\_HARDWARE\_PATH = $(HOME)/Documents/Arduino/hardware  
> include $(BOARD\_HARDWARE\_PATH)/$(MAKEFILE\_PREFIX)/\*.mk

do things behave?

---

<div class="post-metadata">

**Author:** ![phildini](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/phildini/32/299_2.png) [@phildini](https://community.keyboard.io/u/phildini)\
**Post date:** [July 24, 2017, 4:35am UTC](https://community.keyboard.io/t/remapping-keys/268/19 "2017-07-24T04:35:30Z")

</div>

hey I got closer! Now when i try to upload the .ino via the arduino app I get:

```
Arduino: 1.8.3 (Mac OS X), Board: "Keyboardio Model 01"

Bootloader file specified but missing: /Users/phildini/Documents/Arduino/hardware/keyboardio/avr/bootloaders/caterina/Caterina.hex
Sketch uses 17642 bytes (61%) of program storage space. Maximum is 28672 bytes.
Global variables use 1501 bytes (58%) of dynamic memory, leaving 1059 bytes for local variables. Maximum is 2560 bytes.

avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "��"; type = �
    Software Version = .; Hardware Version = �.
avrdude: butterfly_recv(): programmer is not responding
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: buffered memory access not supported. Maybe it isn't
a butterfly/AVR109 but a AVR910 device?
avrdude: initialization failed, rc=-1
         Double check connections and try again, or use -F to override
         this check.

avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: leave prog mode
avrdude: butterfly_recv(): programmer is not responding
avrdude: error: programmer did not respond to command: exit bootloader
avrdude: error: programmer did not respond to command: exit bootloader

Invalid library found in /Users/phildini/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin: /Users/phildini/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin
Invalid library found in /Users/phildini/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin: /Users/phildini/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin

This report would have more information with
"Show verbose output during compilation"
option enabled in File -> Preferences.
```

---

<div class="post-metadata">

**Author:** ![jesse](https://yyz1.discourse-cdn.com/flex031/user_avatar/community.keyboard.io/jesse/32/361_2.png) [@jesse](https://community.keyboard.io/u/jesse)\
**Post date:** [July 24, 2017, 4:42am UTC](https://community.keyboard.io/t/remapping-keys/268/20 "2017-07-24T04:42:11Z")

</div>

Oh. If you were using the Arduino app, you didn’t have to go through any of that craziness. If you were doing commandline builds, you should be able to just “make flash” instead.

When you were doing the flashing, did you hold down the “Prog” button during the process? That’s…supposed to be documented, but I’ve clearly got some work to do. It acts as a hardware interlock to prevent a hostile party from maliciously flashing your keyboard if they have control of a device you’ve plugged into.

[Next page](https://community.keyboard.io/t/remapping-keys/268.md?page=2)
