Coder Social home page Coder Social logo

model01-firmware's Introduction

Keyboardio Model 01 Firmware

This is the source code for the default firmware for the Keyboardio Model 01, as shipped from the factory.

If you don't intend to customize your keyboard's firmware, you may want to consider using Chrysalis, our graphical configuration tool instead.

To use or customize this firmware, you need to have Arduino and Kaleidoscope installed on your computer.

If you don't yet have Kaleidoscope and Arduino installed on your computer, set them up now

Download the Model 01 Firmware

git clone https://github.com/keyboardio/Model01-Firmware.git

Build and flash the firmware

Before you begin, make sure your Model 01 is connected to your computer.

Open the sketch you wish to flash (for example, Model01-Firmware.ino).

Make sure that you've picked the Model 01 from the Boards list in the tools menu.

Click the Upload button or press Ctrl-U.

Hold down the "Prog" key in the top left corner of your keyboard, until the compile finishes and the upload begins.

Start to customize the firmware

You can customize your keyboard's key layout and LED effects by modifying the Model01-Firmware.ino file in the same directory as this README. Model01-Firmware.ino is a computer program written in 'Arduino C'. You can find documentation about Arduino C at https://arduino.cc.

Getting help

As you start to explore customization of your keyboard's firmware, the community at https://community.keyboard.io can often be a valuable resource.

Thanks!

<3 jesse

Build Status

model01-firmware's People

Contributors

ackintosh avatar afreakk avatar algernon avatar aoeu avatar blovett avatar cdisselkoen avatar danbernier avatar gedankenexperimenter avatar hustvedt avatar jennigma avatar jimt avatar malsyned avatar martinakcsilla avatar numist avatar obra avatar ryansb avatar the-compiler avatar tretuna avatar tych0 avatar wesq3 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

model01-firmware's Issues

Releasing `fn` before key enters 2 characters

On the PVT with default firmware, on Windows 10, releasing the fn key while still holding one of uiop prints both characters - {u, [o- and so forth. I find I roll my hand in a way that I do this frequently. Does anyone want this behavior?

Function key interaction degrades mouse usage on Mac OS X

Using the function key after a few minutes creates an issue with mouse/trackpad on Mac OS X. Unplugging and plugging back the keyboard fixes this, after another 20-30 minutes, the same happens. To reproduce this issue, simply use Model 01 on a Mac and use the function keys a few times and try right clicking with your mouse/trackpad.

No longer able to build the firmware after doing a `git pull` just now

I was able to make flash without issues a couple of times, but after I just did a git pull it now breaks with the following error:

BOARD_HARDWARE_PATH="/Users/svanharmelen/Documents/Arduino/hardware" /Users/svanharmelen/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22-dirty) ...
/Users/svanharmelen/Documents/Arduino/Model01-Firmware/Model01-Firmware.ino:29:33: fatal error: Kaleidoscope-NumPad.h: No such file or directory
 #include "Kaleidoscope-NumPad.h"
                                 ^
compilation terminated.
exit status 1
make: *** [flash] Error 1

curly braces sometimes type square braces

hello
on my default model01 firmware this is what happens if I hold fn and tap the U key

[[{{[{{{{[{{[{[{{{[{{{{{{{{[[{{{{[[{[

and tapping UI

{}{}{}[]{}{}[][]{}{}{}{}{}[][][]{}[]{}{}[][]

what's going on?

Add commit SHA to BUILD_INFORMATION string

Now that I'm using and flashing multiple Model01s, it occurs to be it would be nice if the string that's output by the MACRO_VERSION_INFO included something to provide a clue about which firmware build a board is running -- like a build date, or, ideally, the Git SHA of the HEAD at build time.

I looked into adding this, but it turned into a deep hole that ended up in kaleidoscope-builder and that's a big bite to chew.

Is there an easy way to modify BUILD_INFORMATION dynamically, or is this something that would make sense to add elsewhere? I'm happy to send in a patch but I honestly have no idea where to even start with this.

Building fails?

Hi,

I'm using Windows, with Arduino latest version.

I've followed the instructions, cloned the Kaleidescope into the hardware folder.
I also cloned this git repo.

I opened the Model01-Firmware.ino with Arduino.

However, verifying the build fails:

Invalid library found in C:\Users\mikpal\Documents\Arduino\libraries\Model01-Firmware-modded: no headers files (.h) found in C:\Users\mikpal\Documents\Arduino\libraries\Model01-Firmware-modded
Invalid library found in C:\Users\mikpal\Documents\Arduino\libraries\Model01-Jesses-Latest: no headers files (.h) found in C:\Users\mikpal\Documents\Arduino\libraries\Model01-Jesses-Latest
In file included from C:\Users\mikpal\Documents\Arduino\hardware\keyboardio\avr\libraries\Kaleidoscope\src/kaleidoscope/Kaleidoscope.h:60:0,

                 from C:\Users\mikpal\Documents\Arduino\hardware\keyboardio\avr\libraries\Kaleidoscope\src/Kaleidoscope.h:19,

                 from C:\Users\mikpal\Documents\Arduino\libraries\Model01-Firmware-modded\Model01-Firmware-1.22-modded\Model01-Firmware-1.22-modded.ino:17:

C:\Users\mikpal\Documents\Arduino\libraries\Model01-Firmware-modded\Model01-Firmware-1.22-modded\Model01-Firmware-1.22-modded.ino: In static member function 'static kaleidoscope::EventHandlerResult kaleidoscope::Hooks::onSetup()':

C:\Users\mikpal\Documents\Arduino\hardware\keyboardio\avr\libraries\Kaleidoscope\src/kaleidoscope_internal/event_dispatch.h:149:7: internal compiler error: Segmentation fault

       }                                                                   __NL__ \

       ^

C:\Users\mikpal\Documents\Arduino\hardware\keyboardio\avr\libraries\Kaleidoscope\src/kaleidoscope/event_handlers.h:98:4: note: in expansion of macro '_REGISTER_EVENT_HANDLER'

    OPERATION(onSetup,                                                     __NL__ \

    ^

C:\Users\mikpal\Documents\Arduino\hardware\keyboardio\avr\libraries\Kaleidoscope\src/kaleidoscope_internal/event_dispatch.h:201:3: note: in expansion of macro '_FOR_EACH_EVENT_HANDLER'

   _FOR_EACH_EVENT_HANDLER(_REGISTER_EVENT_HANDLER)                            __NL__ \

   ^

C:\Users\mikpal\Documents\Arduino\hardware\keyboardio\avr\libraries\Kaleidoscope\src/kaleidoscope/Kaleidoscope.h:203:40: note: in expansion of macro '_KALEIDOSCOPE_INIT_PLUGINS'

 #define KALEIDOSCOPE_INIT_PLUGINS(...) _KALEIDOSCOPE_INIT_PLUGINS(__VA_ARGS__)

                                        ^

C:\Users\mikpal\Documents\Arduino\libraries\Model01-Firmware-modded\Model01-Firmware-1.22-modded\Model01-Firmware-1.22-modded.ino:433:1: note: in expansion of macro 'KALEIDOSCOPE_INIT_PLUGINS'

 KALEIDOSCOPE_INIT_PLUGINS(

 ^

Please submit a full bug report,

with preprocessed source if appropriate.

See <http://gcc.gnu.org/bugs.html> for instructions.

exit status 1
Error compiling for board Keyboardio Model 01.

I'm not sure what I should do more.

Help please?

fatal error: Kaleidoscope-NumPad.h: No such file or directory #include "Kaleidoscope-NumPad.h"

I can't tell if this is just my setup (which I'm struggling with) or a legit error.

ben-15:Model01-Firmware ben$ pwd
/Users/ben/kaleidoscope/Model01-Firmware
ben-15:Model01-Firmware ben$ make flash
BOARD_HARDWARE_PATH="/Users/ben/Library/Arduino15/packages/keyboardio/hardware/avr/1.19.0" /Users/ben/Library/Arduino15/packages/keyboardio/hardware/avr/1.19.0/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22) ...
/Users/ben/kaleidoscope/Model01-Firmware/Model01-Firmware.ino:29:33: fatal error: Kaleidoscope-NumPad.h: No such file or directory
 #include "Kaleidoscope-NumPad.h"
                                 ^
compilation terminated.
exit status 1
make: *** [flash] Error 1

That file does exist, though:

ben-15:Model01-Firmware ben$ cd ..
ben-15:kaleidoscope ben$ ls
Arduino-Boards		Kaleidoscope		Model01-Firmware
ben-15:kaleidoscope ben$ find . -name Kaleidoscope-NumPad.h
./Arduino-Boards/libraries/Kaleidoscope-NumPad/src/Kaleidoscope-NumPad.h

This does seem like a problem with my installation -- what am I missing here?

Colormap support is incomplete

The factory firmware includes the ColormapEffect plugin, but it does not initialize LEDPaletteTheme, without which the colormap is not usable. We should init LEDPaletteTheme too.

/dev/ttyACM* doesn't exist, can't flash

While trying to change up my layout, I ran across

~/kaleidoscope/Model01-Firmware(master) » make flash                                                                                                         jwittrock@john
/Users/jwittrock/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope-Plugin/tools//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.02-15-g60ed) ...
Press ENTER when ready...

stty: 1200: No such file or directory
make: *** [flash] Error 1

Typing works normally, it's just flashing that fails.

I dug around a bit, and found this in Arduino-Boards/libraries/Kaleidoscope-Plugin/tools/kaleidoscope-builder.conf:

DEVICE_PORT="$(ls /dev/ttyACM* 2>/dev/null || echo '')"
RESET_DEVICE="stty -F ${DEVICE_PORT} 1200 hupcl"

While the keyboard is plugged in, I don't see any ttyACM* devices in /dev, but it seems like this is required. Any idea how I can restore that entry?

Numlock numbers don't work

After hitting the num key, the numberpad area lights up on the keyboard but numbers don't actually work. Some symbols seem to.

Confirmed on Windows 7 and Fedora Linux. I have not reflashed the firmware, this is OOB keyboardio Model 01 with default firmware.

Toggling numlock off doesn't turn it off in the OS

As @warewolf noted on #29, with the default firmware, turning Numlock on works as expected, but turning Numlock off turns the LEDs off and reverts back to the default layer, but leaves the Numlock state still set in the OS.

This means that any other keyboards attached will leave the Capslock LED on, and any applications that check the state of Numlock will be confused (I'm guessing there are extremely few of these - @warewolf and I both noticed this in FVWM.)

edit: Filing this as a fresh bug, since the original bug in #29 was numlock not working, not numlock not turning itself off properly.

Error building after upgrading to Catalina: bad CPU type in executable

make produces the following:

BOARD_HARDWARE_PATH="/Users/fred/Documents/Arduino/hardware" /Users/fred/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder build-all
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22-21-g643d-dirty) ...
fork/exec /Applications/Arduino.app/Contents/Java/hardware/tools/avr/bin/avr-g++: bad CPU type in executable

I think I was previously running macOS 10.12, and I originally cloned this repo maybe two years ago, will try running from a fresh clone, but I wanted to document this error first.

build error in LED-Stalker

Using a fresh clone I can't build the fw:

BOARD_HARDWARE_PATH="/home/fwernli/Arduino/hardware" /home/fwernli/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder build-all
Building ./Model01-Firmware 0.0.0-gv1.22-69-g2f9d into /tmp/kaleidoscope-fwernli/sketch/9138835-Model01-Firmware.ino/output...
In file included from /home/fwernli/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/Kaleidoscope-LED-Stalker.h:20:0,
                 from /home/fwernli/git/Model01-Firmware/Model01-Firmware.ino:55:
/home/fwernli/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/kaleidoscope/plugin/LED-Stalker.h:64:44: error: size of array 'map_' is not an integral constant-expression
     uint8_t map_[Runtime.device().numKeys()];
                                            ^
exit status 1
make: *** [/home/fwernli/Arduino/hardware/keyboardio/build-tools/makefiles//rules.mk:80: build-all] Error 1

Cannot flash: can't open device "/dev/ttyACM1": Device or resource busy

I am failing to flash my M01 on Debian:

...
- Size: firmware/Model01-Firmware/Model01-Firmware-0.0.0-gv1.22-31-gcfc5.elf
  - Program:   22872 bytes (79.8% Full)
  - Data:       1887 bytes (73.7% Full)

When ready, hold down PROG, and press ENTER. Keep holding PROG until flashing starts...

Looking for USB device with vid=1209 and pid=2301
Examining usb-FIBOCOM_L830-EB-00_004999010640000-if02
  ID_VENDOR_ID 2cb7 != 1209
Examining usb-Keyboardio_Model_01_CDkbio01-if00
  Found keyboard!

WARNING: your udev rules are currently configured to suggest
that your keyboard is suitable for use by ModemManager.  This
means that there is a risk of ModemManager interfering.  To avoid
this, copy

    /home/toon/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin/../etc/99-kaleidoscope.rules

to /etc/udev/rules.d
Looking for USB device with vid=1209 and pid=2300
Examining usb-FIBOCOM_L830-EB-00_004999010640000-if02
  ID_VENDOR_ID 2cb7 != 1209
Examining usb-Keyboardio_Model_01_kbio01-if00
  Found keyboard!

WARNING: your udev rules are currently configured to suggest
that your keyboard is suitable for use by ModemManager.  This
means that there is a risk of ModemManager interfering.  To avoid
this, copy

    /home/toon/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin/../etc/99-kaleidoscope.rules

to /etc/udev/rules.d
avrdude: ser_open(): can't open device "/dev/ttyACM1": Device or resource busy
avrdude: ser_open(): can't open device "/dev/ttyACM1": Device or resource busy
make: *** [/home/toon/Arduino/hardware/keyboardio/avr/build-tools/makefiles//rules.mk:72: flash] Error 1

Quote key defined in numlock layer, LED lit when layer is active

Per Eddie Jinks' 2017-11-15 post on the community site (apologies if I'm overlooking some aspect of github etiquette):

Random observation today while I was working and getting used to using NumLock to access the number pad more quickly… The quote key (2 spaces down from the num key) lights up red. I looked at the default legend that comes with the Model 01 and noticed that that key doesn’t have a NumLock assignment.

Through just a little digging, I found that this is due to the fact that the NumLock layer has Key_Quote assigned to that key and doesn’t just fall through to the base layer (also defined as Key_Quote). Was this intentional? Maybe we should just update the default sketch to have that key be transparent so it doesn’t light up red and confuse people.

How to have multiple "primary" layers?

... as in, I would want Colemak as my primary, and QWERTY on a different layer.
I know how to do it with c&p, but I wondered if it would make sense to restructure the code, so that the primary layers all get defined, but not as [PRIMARY], but as '[QWERT]', [COLEMAK] and so on, and then by default, one of those gets assigned to [PRIMARY], and the one of the others could be used as an additional layer.
... or is that not possible because the layers then need to be adjusted anyway to add the function keys to change between them?

make flash doesn't work

I am on linux with an arduino ide I just downloaded. I am sync'd to the latest master (c7fab58).
It will not build. Here's some output to help:

$ make flash
BOARD_HARDWARE_PATH="/home/wt/Arduino/hardware" /home/wt/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22-13-gc7fa) ...
/home/wt/Arduino/Model01-Firmware/Model01-Firmware.ino:285:26: error: expected constructor, destructor, or type conversion before '(' token
 KALEIDOSCOPE_INIT_PLUGINS(
                          ^
exit status 1
/home/wt/Arduino/hardware/keyboardio/avr/build-tools/makefiles//rules.mk:72: recipe for target 'flash' failed
make: *** [flash] Error 1

Magic combo or something to disable eeprom keymaps

Flashing the Model 01's firmware with a firmware that supports eeprom keymaps and having not-quite-perfect data in eeprom can lead to a situation where the keyboard appears to be 'bricked'

We need something like a magic combo to reset the eeprom enough to switch back to using the hardcoded keymaps. I think this is just resetting default layer and whether to hide the hardcoded keymaps

I think I actually want the key combo to only work if held in at boot. Let's call it "LeftFn-Cmd-1"

Cannot buld with Kaleidoscope==07f3ca and firmware==03bee4

I tried to update the codebase because I wanted to update my Model01-Firmware and to start hacking again. It appears to me that the firmware cannot be build with the recent version of Kaleidoscope.

I am on Debian Testing. I updated to Arduino 1.8.12 by sudo rm -r /usr/local/arduino first and then following the instructions in the wiki. I updated the code base by rm -rf ~/Arduino first and then following the instructions in the README.md.

When I change to the Model01-Firmware folder and run make, the following error message is produced:

[...]
In file included from /home/maxg/Arduino/hardware/keyboardio/avr/libraries/Model01-Firmware/Model01-Firmware.ino:17:0:
/home/maxg/.arduino15/packages/keyboardio/hardware/avr/1.22.0/libraries/Kaleidoscope/src/Kaleidoscope.h: In member function 'void Kaleidoscope_::setup(byte)':
/home/maxg/.arduino15/packages/keyboardio/hardware/avr/1.22.0/libraries/Kaleidoscope/src/Kaleidoscope.h:67:25: warning: unused parameter 'keymap_count' [-Wunused-parameter]
   void setup(const byte keymap_count)
                         ^~~~~~~~~~~~
At global scope:
cc1plus: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
cc1plus: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
In file included from /home/maxg/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/kaleidoscope/Runtime.h:19:0,
                 from /home/maxg/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/kaleidoscope/plugin/FocusSerial.h:20,
                 from /home/maxg/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/Kaleidoscope-FocusSerial.h:20,
                 from /home/maxg/Arduino/hardware/keyboardio/avr/libraries/Model01-Firmware/Model01-Firmware.ino:24:
/home/maxg/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/kaleidoscope_internal/device.h:22:22: error: 'Device' in namespace 'kaleidoscope' does not name a type
 extern kaleidoscope::Device device;

[...]

               ^
In file included from /home/maxg/.arduino15/packages/keyboardio/hardware/avr/1.22.0/libraries/Kaleidoscope-EEPROM-Settings/src/Kaleidoscope/EEPROM-Settings.h:22:0,
                 from /home/maxg/.arduino15/packages/keyboardio/hardware/avr/1.22.0/libraries/Kaleidoscope-EEPROM-Settings/src/Kaleidoscope-EEPROM-Settings.h:21,
                 from /home/maxg/Arduino/hardware/keyboardio/avr/libraries/Model01-Firmware/Model01-Firmware.ino:20:
/home/maxg/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/EEPROM/src/EEPROM.h: At global scope:
/home/maxg/.arduino15/packages/arduino/hardware/avr/1.6.21/libraries/EEPROM/src/EEPROM.h:145:20: warning: 'EEPROM' defined but not used [-Wunused-variable]
 static EEPROMClass EEPROM;
                    ^~~~~~
exit status 1
make: *** [/home/maxg/Arduino/hardware/keyboardio/build-tools/makefiles//rules.mk:80: build-all] Fehler 1

I am including only the first and the last error message due to size restrictions.

Is this a bug or is the error on my side?

running `make flash` on OSX Catalina fails with "avrdude: butterfly_recv(): programmer is not responding"

Hello!

I'm on mac Catalina 10.15. I'm running into the following issue when trying to flash using the latest HEAD of master for the firmware with the latest libraries.

I have some local modifications... so to be sure those were not a factor I did a git reset --hard to the HEAD of this firmware repo and also ran the make update-submodules command in the hardware/keyboardio directory.

The only real change I've made since the last successful update was to update the libraries... although I wish I had tried to flash right before that because I can't remember for sure if I've flashed it since the upgrade to Catalina on mac. I'm a little concerned that maybe Catalina changes some permissions that are preventing access to the keyboard, but I'm not sure how to test that theory. If others are able to build successfully not on Catalina though that might be a good indicator 😆

When starting the flash... sometimes the prog key turns red and sometimes it doesn't, but I get the same error message in both cases.

I'm not sure what else to try currently, has anyone else run into this issue or have any insights into where next to look for a solution?

12:14:05 ~/Documents/Arduino/Model01-Firmware(master) 
$ make flash
BOARD_HARDWARE_PATH="/Users/ross/Documents/Arduino/hardware" /Users/ross/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building ./Model01-Firmware 0.0.0-g
v1.22-67-g4299 into /var/folders/lr/jfsdjryx2vbc0bdzt9qf2kl80000gn/T//kaleidoscope-ross/sketch/774572-Model01-Firmware.ino/output...
- Size: firmware/Model01-Firmware/Model01-Firmware-0.0.0-g
v1.22-67-g4299.elf
  - Program:   25010 bytes (87.2% Full)
  - Data:       1338 bytes (52.3% Full)

To update your keyboard's firmware, hold down the 'Prog' key on your keyboard,
and then press 'Enter'.

When the 'Prog' key glows red, you can release it.


2019-10-27 12:16:09.176 system_profiler[38849:845882] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
2019-10-27 12:16:12.428 system_profiler[38862:845975] SPUSBDevice: IOCreatePlugInInterfaceForService failed 0xe00002be
Connecting to programmer: .
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "
.
"; type = 

.   Software Version = 
; Hardware Version = ..
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: error: programmer did not respond to command: leave prog mode
Connecting to programmer: .
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "
.
"; type = 

.   Software Version = 
; Hardware Version = ..
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: error: programmer did not respond to command: leave prog mode
make: *** [flash] Error 1

Stuck in numlock on modified keymap

I've modified my keymap in the firmware so that the any key activates numlock instead of the num key, but when I enter Numlock mode, the fall-through for the any key continues to send the macro-version-info text out the pipe. As such, the only way for me to leave numlock mode is to unplug and re-plug-in my keyboard.

Anyone have any ideas about how to fix this?

I'm on Mac OS 10.13.4, if that makes any difference, and my customized keymap looks like this:

KEYMAPS(

  [QWERTY] = KEYMAP_STACKED
  (Key_Escape,   Key_1, Key_2, Key_3, Key_4, Key_5, Key_LEDEffectNext,
   Key_Tab, Key_Q, Key_W, Key_E, Key_R, Key_T, Key_Tab,
   Key_LeftControl,   Key_A, Key_S, Key_D, Key_F, Key_G,
   Key_LeftShift, Key_Z, Key_X, Key_C, Key_V, Key_B, Key_LeftGui,
   Key_Backtick, Key_Spacebar, Key_Enter, Key_LeftAlt,
   ShiftToLayer(FUNCTION),

   LockLayer(NUMPAD),  Key_6, Key_7, Key_8,     Key_9,         Key_0,         Key_Minus,
   Key_Enter,     Key_Y, Key_U, Key_I,     Key_O,         Key_P,         Key_Equals,
                  Key_H, Key_J, Key_K,     Key_L,         Key_Semicolon, Key_Quote,
   Key_RightAlt,  Key_N, Key_M, Key_Comma, Key_Period,    Key_Slash,     Key_RightShift,
   Key_RightShift, Key_LeftAlt, Key_Backspace, Key_Minus,
   ShiftToLayer(FUNCTION)),


  [NUMPAD] =  KEYMAP_STACKED
  (___, ___, ___, ___, ___, ___, ___,
   ___, ___, ___, ___, ___, ___, ___,
   ___, ___, ___, ___, ___, ___,
   ___, ___, ___, ___, ___, ___, ___,
   ___, ___, ___, ___,
   ___,

   ___,                    ___, Key_Keypad7, Key_Keypad8,   Key_Keypad9,        Key_KeypadSubtract,  M(MACRO_VERSION_INFO),
   ___,                    ___, Key_Keypad4, Key_Keypad5,   Key_Keypad6,        Key_KeypadAdd,      ___,
                           ___, Key_Keypad1, Key_Keypad2,   Key_Keypad3,        Key_Equals,         ___,
   ___,                    ___, Key_Keypad0, Key_KeypadDot, Key_KeypadMultiply, Key_KeypadDivide,   Key_Enter,
   ___, ___, ___, ___,
   ___),

  [FUNCTION] =  KEYMAP_STACKED
  (___,      Key_F1,           Key_F2,      Key_F3,     Key_F4,        Key_F5,           XXX,
   Key_Tab,  ___,              Key_mouseUp, ___,        Key_mouseBtnR, Key_mouseWarpEnd, Key_mouseWarpNE,
   Key_Home, Key_mouseL,       Key_mouseDn, Key_mouseR, Key_mouseBtnL, Key_mouseWarpNW,
   Key_End,  Key_PrintScreen,  Key_Insert,  ___,        Key_mouseBtnM, Key_mouseWarpSW,  Key_mouseWarpSE,
   ___, Key_Enter , ___, ___,
   ___,

   Consumer_ScanPreviousTrack, Key_F6,                 Key_F7,                   Key_F8,                   Key_F9,          Key_F10,          Key_F11,
   Consumer_PlaySlashPause,    Consumer_ScanNextTrack, Key_LeftCurlyBracket,     Key_RightCurlyBracket,    Key_LeftBracket, Key_RightBracket, Key_F12,
                               Key_LeftArrow,          Key_DownArrow,            Key_UpArrow,              Key_RightArrow,  ___,              ___,
   Key_PcApplication,          Consumer_Mute,          Consumer_VolumeDecrement, Consumer_VolumeIncrement, ___,             Key_Backslash,    Key_Pipe,
   ___, ___, Key_Delete, ___,
   ___)

	) // KEYMAPS(

Relationship with kaleidoscope repo is confusing

Context: I need to make an update to my Model01 firmware (after forking this repo a long time ago and making some changes in the layout).

I'm having trouble understanding the relationship between this repo and Kaleidoscope. In particular, I found https://github.com/keyboardio/Kaleidoscope/tree/master/examples/Devices/Keyboardio/Model01, which seems to be Model01 firmware too, but the .ino files are significantly different. Which one should I use? I'm fine with starting from scratch and re-doing my layout on top of current default firmware, but I'd like to know what exactly should I use as a starting point. Currently I'm quite confused.

make flash error on macOS

after following setup instructions in README

Keyboard was plugged in. Confirmed by lit LEDs and having typed on it.

After hitting ENTER lights went out.

make flash
BOARD_HARDWARE_PATH="/Users/masukomi/Documents/Arduino/hardware" /Users/masukomi/Documents/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22-3-gb745) ...
Press ENTER when ready...

Connecting to programmer: .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
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "��"; type = w
    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
Connecting to programmer: .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
avrdude: butterfly_recv(): programmer is not responding
Found programmer: Id = "��"; type = G
    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

seemed to continue on in this vein. Tried to ^C out of it but that didn't work.

Unplugging keyboard did kill it.

variable or field 'anyKeyMacro' declared void

Using Fresh Install, following https://kaleidoscope.readthedocs.io/en/latest/setup_toolchain.html#Arduino-Windows
OS: Win10,
Arduino IDE: 1.8.18,
Boards: Kaleidoscope keyboards v 1.99.3

Using the latest master 05854a8 from: https://github.com/keyboardio/Model01-Firmware/blob/master/Model01-Firmware.ino

Getting the following error during Verify/Compile in the Arduino IDE:

Arduino: 1.8.18 (Windows 10), Board: "Keyboardio Model 01"


Model01-Firmware:303:25: error: variable or field 'anyKeyMacro' declared void

 static void anyKeyMacro(KeyEvent &event) {

                         ^~~~~~~~

Model01-Firmware:303:25: error: 'KeyEvent' was not declared in this scope

Projects\Model01-Firmware\Model01-Firmware.ino:303:25: note: suggested alternative: 'Key_Menu'

 static void anyKeyMacro(KeyEvent &event) {

                         ^~~~~~~~

                         Key_Menu

Model01-Firmware:303:35: error: 'event' was not declared in this scope

 static void anyKeyMacro(KeyEvent &event) {

                                   ^~~~~

Model01-Firmware:320:46: error: 'KeyEvent' has not been declared

 const macro_t *macroAction(uint8_t macro_id, KeyEvent &event) {

                                              ^~~~~~~~

Projects\Model01-Firmware\Model01-Firmware.ino: In function 'const macro_t* macroAction(uint8_t, int&)':

Model01-Firmware:324:28: error: request for member 'state' in 'event', which is of non-class type 'int'

     versionInfoMacro(event.state);

                            ^~~~~

Model01-Firmware:328:5: error: 'anyKeyMacro' was not declared in this scope

     anyKeyMacro(event);

     ^~~~~~~~~~~

exit status 1

variable or field 'anyKeyMacro' declared void



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


Build error on Arch Linux: variable 'keymaps' with dynamic initialization put into program memory area

With some help from this thread I was able to get make flash running, up until I hit this error:

$ make flash
BOARD_HARDWARE_PATH="/home/gabe/Arduino/hardware" /home/gabe/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/bin//kaleidoscope-builder flash
Building output/Model01-Firmware/Model01-Firmware (0.0.0-gv1.22-13-gc7fa) ...
In file included from /home/gabe/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/Kaleidoscope.h:26,
                 from /home/gabe/src/Model01-Firmware/Model01-Firmware.ino:17:
/home/gabe/src/Model01-Firmware/Model01-Firmware.ino: In function '(static initializers for /home/gabe/src/Model01-Firmware/Model01-Firmware.ino)':
/home/gabe/Arduino/hardware/keyboardio/avr/libraries/Kaleidoscope/src/layers.h:11:13: error: variable 'keymaps' with dynamic initialization put into program memory area
   const Key keymaps[][ROWS][COLS] PROGMEM = { layers };  \
             ^~~~~~~
/home/gabe/src/Model01-Firmware/Model01-Firmware.ino:131:1: note: in expansion of macro 'KEYMAPS'
 KEYMAPS(
 ^~~~~~~
exit status 1
make: *** [/home/gabe/Arduino/hardware/keyboardio/avr/build-tools/makefiles//rules.mk:72: flash] Error 1

I'm not familiar enough with Arduino to guess what might be going wrong here, maybe it's not detecting right board definition?

FWIW I have not made any modifications yet, this is straight from master

not possible to combine alt & shift in stock firmware

I can't combine the alt & shift modifiers using a chord, which is important for some of the 'stock' emacs bindings.

  • chording "alt shift ." has the same effect as "alt ."
  • chording "shift alt ." has the same effect as "shift ."

I guess this won't be a hard fix, because ctrl & shift do seem to play nice together. For example the default emacs binding for undo is the chord "ctrl shift -". This works as expected.

So is there some firmware difference between alt & ctrl?

In case this bug is OS-dependent I'm using arch linux.

How to deal with multiple deployments of keymaps

The purpose of this repo appears to be to present The Standard Model 01 firmware, which is a perfectly fine thing.

But if we consider QMK, there are two other purposes that are not perfectly served:

  1. There may be interest in sharing some set of keymaps, much as there are, for QMK/Planck, about 70 different keymap sets. There is thus some merit in this repo having a spot for Other Sample Implementations. That said, something that is a bit of a pain about QMK is that the repo is very "chatty" in that people keep adding changes for keymaps that most people don't care about.

  2. Presumably many of us will want our own (singular) keymap, that's essentially a variation on The Standard firmware. If I do that by modifying Model01-Firmware.ino, then my changes will forever be fighting with those that others are making in their forks of this repo.

There's merit to the Standard Keymap being something we are intended to clone for ourselves; it seems like a fine thing to have some somewhat opinionated way of doing this.

I'm not sure what's best. The QMK "many keymaps" thing has merit, and there's merit to embracing something like that so that my keymap can coexist happily with the Sample Implementation. But #2 suggests we shouldn't jump straight there...

Keypresses are wrong over RDP

Hi
When pressing {, } or | (fn+ u, i, -) the order of the events seems to be either inconsistent or just plain wrong. On connections via RDP this makes some keypresses output the wrong key.
Pressing { might yield [ sometimes. } => ] and | => .

Attaching 'xev' logs of fn+- (fn and dash).

On physical machines - the mapping is always OK.
Using VMWare PCoIP mapping is OK
Using Physical -> RDP mapping is BAD
Using Physical -> VMWare PCoIP -> RDP mapping is BAD

You can see that most keypress events are "|" but some are on ""
I've also seen the ordering of key-release \ come both after and before key-release Lshift

What can I do ??
keyboardlogs.txt

Weird behavior on linux 5.12?

The summary of my problem can be found in NixOS/nixpkgs#126423.

Something's changed about the way the Model 01 is detected, and it seems related to it not getting assigned the right layout on boot. See especially this comment which shows some changes in the output of xinput list.

Reproduced on NixOS, but I can try and test this behavior on Archlinux tomorrow morning, I'll report back with my findings. Hopefully the Model 01's firmware repo is the right place to report this? Please let me know.

I can also provide dmesg output or other if needed

Curly braces don't unshift right away

Steps to reproduce:

  • Hold Fn key
  • trill {}[] (left brace, right brace, left bracket, right bracket) as quickly as possible

Expected result:
Types "{}[]"

Actual result:
Types {}{] or {}{}

Multiple characters on keypress

Not sure if this is firmware or something else. My 'a' key likes to randomly print 2-3 extra 'a's sometimes, forcing me to go back and delete the extra ones. Additionally, sometimes after pressing the key the input is delayed a bit so when typing fast the letter can end up interchanged with the next one eg. asdf -> sadf.

This only happens with the 'a' key and no other keys.

ps/2 fallback support

I'm trying to connect the model01 via a usb->ps/2 adapter but the looking in the bios the Port is not recognizing the device and listed as empty.

I don't actually have a standard ps/2 keyboard to verify the port is working correctly or another device to verify the adapter is working correctly but the Model 01 powers on and is responsive when typing so I suspect the model01 just doesn't have support for it?

The best explanation I can find is a random post on reddit https://www.reddit.com/r/buildapc/comments/bbpytn/b450_tomahawk_ps2_port_help/

Any background info or direction for enabling support would be greatly appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.