Skip to content
M5Stack OnScreenKeyboard オンスクリーン キーボード
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.
examples Add: setTextFont , setFreeFont Feb 20, 2019
src Update: Support TAB CR LF code. Apr 6, 2019
LICENSE Initial commit Jan 6, 2019 Update: Feb 20, 2019 beta version commit. Jan 6, 2019
library.json Update: Support TAB CR LF code. Apr 6, 2019

M5Stack OnScreenKeyboard library. (for ASCII code)

Add Keyboard for your M5Stack project.



OnScreenKeyboard which can be operated with 3 button.


Support FACES Keyboard and GameBoy unit.
Support PLUS Encoder unit.
Support JoyStick unit.
Support CardKB unit.
Support morse code input.

M5Stackの各種ユニットでの操作にも対応。 A+C 2ボタン同時押しでモールス入力モードに切替可能。


Common operation:
BtnA click : キーボードパネル切替 Keyboard panel switches.
BtnA and B hold and BtnC click : 全消去 Clear all strings.
BtnA hold and BtnC click : モールス入力/フォーカス入力 モード切替 Switch between Morse code mode and focus selection mode.

in focus mode:
BtnA hold : 左(上)に移動 The focus moves to the left (or up).
BtnB click(or hold) : 選択決定、行/列選択切替 The focused target is entered. Then switch the row/column selection.
BtnC click(or hold) : 右(下)に移動 The focus moves to the right (or down).
BtnA hold and BtnB click : 入力完了(または列選択に戻る) Finish keyboard input. (or back to column selection.)

in morse code mode:
BtnB click : モールス短音入力 Input a short pulse.
BtnC click : モールス長音入力 Input a long pulse.
Release BtnB and C for 700 msec : 入力確定 Fix input.
BtnA hold and BtnB click : 入力完了 Finish keyboard input.

Morse code is GBoard morse compliant.
GBoard morse code list


#include <M5OnScreenKeyboard.h>

M5OnScreenKeyboard m5osk;

  m5osk.useFACES = true;       // FACES unit support.
  m5osk.useCardKB = true;      // CARDKB unit support.
  m5osk.useJoyStick = true;    // JoyStick unit support.
  m5osk.usePLUSEncoder = true; // PLUS Encoder unit support.
  // m5osk.swapBtnBC = true;   // BtnB/BtnC KeyAssign swap.

//m5osk.setup("Hello World."); // You can also set default text

  while (m5osk.loop()) {
    // You can write your code here.
  String text = m5osk.getString();


LGPL v2.1



You can’t perform that action at this time.