GithubHelp home page GithubHelp logo

Comments (6)

MightyPork avatar MightyPork commented on May 21, 2024

https://stackoverflow.com/questions/424407/handling-key-press-events-f1-f12-using-javascript-and-jquery-cross-browser

from espterm-firmware.

MightyPork avatar MightyPork commented on May 21, 2024
// --- O-sequences --
F1  \eOP
F2  \eOQ
F3  \eOR
F4  \eOS
F5  \eOt
F6  \eOu
F7  \eOv
F8  \eOl
F9  \eOw
F10 \eOx

HOME	\eOH
END		\eOF

// --- TELNET codes ---
F1 \e[11~
F2 \e[12~
F3 \e[13~
F4 \e[14~
F5 \e[15~
F6 \e[17~
F7 \e[18~
F8 \e[19~
F9 \e[20~
F10 \e[21~
F11 \e[23~
F12 \e[24~
F13 \e[25~
F14 \e[26~
F15 \e[28~
F16 \e[29~
F17 \e[31~
F18 \e[32~
F19 \e[33~
F20 \e[34~

Shift+F1 \e[25~
Shift+F2 \e[26~
Shift+F3 \e[28~
Shift+F4 \e[29~
Shift+F5 \e[31~
Shift+F6 \e[32~
Shift+F7 \e[33~
Shift+F8 \e[34~

Ctrl+A \001
Ctrl+B \002
Ctrl+C \003
Ctrl+D \004
Ctrl+E \005
Ctrl+F \006
Ctrl+G \007
Ctrl+H \008

INSERT	\e[2~
DELETE	\e[3~
PGUP	\e[5~
PGDN	\e[6~

//--- MicroMite Basic ---
// where has this come from??
0xB3 - Shift+F3

ctrl sequences are SYMBOL & 0x1F

from espterm-firmware.

MightyPork avatar MightyPork commented on May 21, 2024

weird micromite codes

// the values returned by the standard control keys
#define TAB     	0x9
#define BKSP    	0x8
#define ENTER   	0xd
#define ESC     	0x1b

// the values returned by the function keys
#define F1      	0x91
#define F2      	0x92
#define F3      	0x93
#define F4      	0x94
#define F5      	0x95
#define F6      	0x96
#define F7      	0x97
#define F8      	0x98
#define F9      	0x99
#define F10     	0x9a
#define F11     	0x9b
#define F12     	0x9c

// the values returned by special control keys
#define UP		0x80
#define DOWN		0x81
#define LEFT		0x82
#define RIGHT		0x83
#define INSERT		0x84
#define DEL		0x7f
#define HOME		0x86
#define END		0x87
#define PUP		0x88
#define PDOWN		0x89
#define NUM_ENT		ENTER
#define SLOCK		0x8c
#define ALT		0x8b

from espterm-firmware.

MightyPork avatar MightyPork commented on May 21, 2024

apparently micromite basic translates some ansi sequences to their weird codes, so this may work

/*****************************************************************************************
The vt100 escape code sequences
===============================
3 char codes            Arrow Up    esc [ A
                        Arrow Down  esc [ B
                        Arrow Right esc [ C
                        Arrow Left  esc [ D

4 char codes            Home        esc [ 1 ~
                        Insert      esc [ 2 ~
                        Del         esc [ 3 ~
                        End         esc [ 4 ~
                        Page Up     esc [ 5 ~
                        Page Down   esc [ 6 ~

5 char codes            F1          esc [ 1 1 ~
                        F2          esc [ 1 2 ~
                        F3          esc [ 1 3 ~
                        F4          esc [ 1 4 ~
                        F5          esc [ 1 5 ~         note the
                        F6          esc [ 1 7 ~         disconnect
                        F7          esc [ 1 8 ~
                        F8          esc [ 1 9 ~
                        F9          esc [ 2 0 ~
                        F10         esc [ 2 1 ~         note the
                        F11         esc [ 2 3 ~         disconnect
                        F12         esc [ 2 4 ~

                        SHIFT-F3    esc [ 2 5 ~         used in the editor

from espterm-firmware.

MightyPork avatar MightyPork commented on May 21, 2024

in conclusion it appears the esc [ num ~ codes and Ctrl- codes will be sufficient

from espterm-firmware.

MightyPork avatar MightyPork commented on May 21, 2024

implemented client-side, but will need adjustments wrt #52

from espterm-firmware.

Related Issues (20)

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.