Skip to content

Instantly share code, notes, and snippets.

@leavesofgrass
Last active December 17, 2017 19:23
Show Gist options
  • Save leavesofgrass/021878ab0a209c34a699296786f69a2c to your computer and use it in GitHub Desktop.
Save leavesofgrass/021878ab0a209c34a699296786f69a2c to your computer and use it in GitHub Desktop.
Elisp function to flash Keyboardio Model 01 firmware in a shell.
(defun kaleidoscope-shell-flash ()
(interactive)
(shell "*kaleidoscope-shell*")
(goto-char (point-max))
(comint-kill-input)
(insert "cd ~/kaleidoscope/Kaleidoscope")
(comint-send-input)
(goto-char (point-max))
(comint-kill-input)
(insert "sudo make flash")
(comint-send-input))
(global-set-key (kbd "<f12>") 'kaleidoscope-shell-flash)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment