Skip to content

Instantly share code, notes, and snippets.

@tokyoff
tokyoff / obk_long_press.ino
Last active August 24, 2019 11:09
長押し(キーを押している間入力し続ける)に対応したワンボタンキーボード用ソースコード
//------------------------------------
// ワンボタンキーボード 長押し対応版
// https://www.one-button-key.com/
//------------------------------------
#include "Keyboard.h"
#define PIN_KEYSW (9)
int prevKeyState;
int currKeyState;
@tokyoff
tokyoff / one_button_keyboard.ino
Last active December 3, 2021 22:16
ワンボタンキーボードの基本形ソースコード
#include "Keyboard.h"
#define PIN_KEYSW (9)
int prevKeyState;
int currKeyState;
void setup() {
pinMode(PIN_KEYSW, INPUT_PULLUP);
prevKeyState = HIGH;