8000 docs(common): add extended string binary specification to kmx-file-format.md · Issue #13990 · keymanapp/keyman · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content
docs(common): add extended string binary specification to kmx-file-format.md #13990
Open
@mcdurdin

Description

@mcdurdin

Noted that the whole UC_SENTINEL / CODE_xxx / ... extended string format is missing from this file. Possibly A80F helpful for @markcsinclair if we can get this documented!

Extended strings are a C-style zero-terminated UTF-16LE string. They can contain variable-length tokens to embed additional functionality. These are prefixed with a UC_SENTINEL codepoint, then a CODE_xxxx codepoint, and then 0 or more parameters.

See:

#define UC_SENTINEL 0xFFFF
#define UC_SENTINEL_EXTENDEDEND 0x10 // was ((CODE_LASTCODE)+1)... what was I thinking?
#define U_UC_SENTINEL u"\uFFFF"
/*
* VK__MAX defines the highest virtual key code defined in the system = 0xFF. Custom VK codes start at 256
*/
#define VK__MAX 255
#define CODE_ANY 0x01
#define CODE_INDEX 0x02
#define CODE_CONTEXT 0x03
#define CODE_NUL 0x04
#define CODE_USE 0x05
#define CODE_RETURN 0x06
#define CODE_BEEP 0x07
#define CODE_DEADKEY 0x08
// 0x09 = bkspace.-- we don't need to keep this separate though with UC_SENTINEL
#define CODE_EXTENDED 0x0A
//#define CODE_EXTENDEDEND 0x0B deprecated
#define CODE_SWITCH 0x0C
#define CODE_KEY 0x0D
#define CODE_CLEARCONTEXT 0x0E
#define CODE_CALL 0x0F
// UC_SENTINEL_EXTENDEDEND 0x10
#define CODE_CONTEXTEX 0x11
#define CODE_NOTANY 0x12
#define CODE_KEYMAN70_LASTCODE 0x12
#define CODE_SETOPT 0x13
#define CODE_IFOPT 0x14
#define CODE_SAVEOPT 0x15
#define CODE_RESETOPT 0x16
#define CODE_KEYMAN80_LASTCODE 0x16
/* Keyman 9.0 codes */
#define CODE_IFSYSTEMSTORE 0x17
#define CODE_SETSYSTEMSTORE 0x18
#define CODE_LASTCODE 0x18

Metadata

Metadata

Assignees

Type

No type

Projects

Status

Todo

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0