# Adding AutoShift to Preonic?

**URL:** <https://community.keyboard.io/t/adding-autoshift-to-preonic/13594>\
**Category:** Programming\
**Tags:** question, plugin\
**Created:** [July 23, 2025, 12:43am UTC](https://community.keyboard.io/t/adding-autoshift-to-preonic/13594 "2025-07-23T00:43:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Hanuman42](https://avatars.discourse-cdn.com/v4/letter/h/bbe5ce/32.png) [@Hanuman42](https://community.keyboard.io/u/Hanuman42)\
**Post date:** [July 23, 2025, 12:43am UTC](https://community.keyboard.io/t/adding-autoshift-to-preonic/13594/1 "2025-07-23T00:43:05Z")

</div>

I’m trying to add AutoShift to my Preonic. I was able to compile the example sketch but once I include Kaleidoscope-AutoShift.h, I get errors:  
[Preonic-AutoShift.ino](https://community.keyboard.io/uploads/short-url/5KjtmkuKHsBVlwHeiiq7I2v4NZZ.ino) (21.0 KB)

In file included from C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/Kaleidoscope-AutoShift.h:25,  
from C:\Users\chaiy\AppData\Local\Temp.arduinoIDE-unsaved2025622-19528-1ic6fka.s771j\Preonic\Preonic.ino:63:  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h: In member function ‘constexpr void kaleidoscope::plugin::AutoShift::Categories::set(uint8\_t) const’:  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h:106:17: error: assignment of member ‘kaleidoscope::plugin::AutoShift::Categories::raw\_bits\_’ in read-only object  
106 | raw\_bits\_ = raw\_bits;  
| ~~^~  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h:105:20: error: invalid return type ‘void’ of ‘constexpr’ function ‘constexpr void kaleidoscope::plugin::AutoShift::Categories::set(uint8\_t) const’  
105 | constexpr void set(uint8\_t raw\_bits) {  
| ^~~  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h: In member function ‘constexpr void kaleidoscope::plugin::AutoShift::Categories::add(kaleidoscope::plugin::AutoShift::Categories) const’:  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h:109:23: error: assignment of member ‘kaleidoscope::plugin::AutoShift::Categories::raw\_bits\_’ in read-only object  
109 | this-\>raw\_bits\_ |= categories.raw\_bits\_;  
| ~~^~~~~~~~~  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h:108:20: error: invalid return type ‘void’ of ‘constexpr’ function ‘constexpr void kaleidoscope::plugin::AutoShift::Categories::add(kaleidoscope::plugin::AutoShift::Categories) const’  
108 | constexpr void add(Categories categories) {  
| ^~~  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h: In member function ‘constexpr void kaleidoscope::plugin::AutoShift::Categories::remove(kaleidoscope::plugin::AutoShift::Categories) const’:  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h:112:23: error: assignment of member ‘kaleidoscope::plugin::AutoShift::Categories::raw\_bits\_’ in read-only object  
112 | this-\>raw\_bits\_ &= ~(categories.raw\_bits\_);  
| ~~^~~~~~~~~~~~  
C:\Users\chaiy\AppData\Local\Arduino15\packages\keyboardio\hardware\nrf52\2025.7.1223054\libraries\Kaleidoscope-AutoShift\src/kaleidoscope/plugin/AutoShift.h:111:20: error: invalid return type ‘void’ of ‘constexpr’ function ‘constexpr void kaleidoscope::plugin::AutoShift::Categories::remove(kaleidoscope::plugin::AutoShift::Categories) const’  
111 | constexpr void remove(Categories categories) {  
| ^ ~~~~~  
exit status 1

Compilation error: exit status 1
