text input config panel with keymap preview

This commit is contained in:
minjaesong
2021-11-11 12:09:23 +09:00
parent 7797e1308d
commit 8efe51a248
16 changed files with 227 additions and 137 deletions

View File

@@ -1,4 +1,4 @@
{"n":"Colemak-DH","capslock":"back","t":[[""],[undefined],
{"n":"Colemak Mod\u2013DH","capslock":"back","t":[[""],[undefined],
[undefined],
["<HOME>"],
[undefined],

View File

@@ -344,6 +344,7 @@ let bufAssemble = (isPreview) => {
//let bufDebugStringify = (buf) => [0,1,2].map(i => (buf[i] == undefined) ? "·" : `\\u${buf[i].codePointAt(0).toString(16).toUpperCase()}`).join(' ')
let bufDebugStringify = (buf) => [0,1,2].map(i => (buf[i] == undefined) ? "·" : `${buf[i]}`).join(' ')
return Object.freeze({"n":"두벌식 표준","v":"one","c":"CuriousTo\uA75Bvald",
"t":states.keylayouts.map(it => [it[0],it[1]]),
// return: [displayed output, composed output]
"accept":(headkey,shiftin,altgrin)=>{
let layer = 1*shiftin// + 2*altgrin

View File

@@ -370,6 +370,7 @@ let bufAssemble = (isPreview) => {
}
let bufDebugStringify = (buf) => [0,1,2].map(i => (buf[i] == undefined) ? "·" : `\\u${buf[i].codePointAt(0).toString(16).toUpperCase()}`).join(' ')
return Object.freeze({"n":"세벌식 3-90","v":"one","c":"CuriousTo\uA75Bvald",
"t":states.keylayouts.map(it => [it[0],it[1]]),
// return: [displayed output, composed output]
"accept":(headkey,shiftin,altgrin)=>{
let layer = 1*shiftin// + 2*altgrin

View File

@@ -65,7 +65,7 @@ let states = {"keylayouts":[[""],[undefined],
[undefined],
["\n"],
["\x08"],
["`","~"],
["¤","~"],
["-","_"],
["=","+"],
["[","{"],
@@ -381,6 +381,7 @@ let bufAssemble = (isPreview) => {
}
let bufDebugStringify = (buf) => [0,1,2].map(i => (buf[i] == undefined) ? "·" : `\\u${buf[i].codePointAt(0).toString(16).toUpperCase()}`).join(' ')
return Object.freeze({"n":"신세벌식 P2","v":"one","c":"CuriousTo\uA75Bvald",
"t":states.keylayouts.map(it => [it[0],it[1]]),
// return: [displayed output, composed output]
"accept":(headkey,shiftin,altgrin)=>{
let layer = 1*shiftin// + 2*altgrin

View File

@@ -261,6 +261,7 @@ let reset = () => {
let inRange = (s,a,b) => (a <= s && s <= b)
let isDiacritics = (s) => s !== undefined && inRange(s.charCodeAt(0), 0x0300, 0x036F)
return Object.freeze({"n":"Русс. ЙЦУКЕН","v":"none","c":"CuriousTo\uA75Bvald",
"t":states.keylayouts.map(it => [it[0],it[1]]),
// return: [displayed output, composed output]
"accept":(headkey,shiftin,altgrin)=>{
let layer = 1*shiftin// + 2*altgrin

View File

@@ -26,32 +26,32 @@ let states = {"keylayouts":[[""],[undefined],
[undefined],
[undefined],
[undefined],
["a","A"],
["b","B"],
["c","C"],
["d","D"],
["e","E"],
["f","F"],
["g","G"],
["h","H"],
["i","I"],
["j","J"],
["k","K"],
["l","L"],
["m","M"],
["n","N"],
["o","O"],
["p","P"],
["q","Q"],
["r","R"],
["s","S"],
["t","T"],
["u","U"],
["v","V"],
["w","W"],
["x","X"],
["y","Y"],
["z","Z"],
["a","A","日"],
["b","B","月"],
["c","C","金"],
["d","D","木"],
["e","E","水"],
["f","F","火"],
["g","G","土"],
["h","H","竹"],
["i","I","戈"],
["j","J","十"],
["k","K","大"],
["l","L","中"],
["m","M","一"],
["n","N","弓"],
["o","O","人"],
["p","P","心"],
["q","Q","手"],
["r","R","口"],
["s","S","尸"],
["t","T","廿"],
["u","U","山"],
["v","V","女"],
["w","W","田"],
["x","X","难"],
["y","Y","卜"],
["z","Z","造"],
["","《"],
["。","》"],
[undefined],
@@ -270,6 +270,7 @@ let getCandidatesUsingBuf = () => {
return `${states.buf},${states.candidates}`
}
return Object.freeze({"n":"五仓简体 Qwerty","v":"many","c":"CuriousTo\uA75Bvald, 倉頡之友 。馬來西亞 http://www.chinesecj.com",
"t":states.keylayouts.map(it => [(it[2]||it[0]),it[1]]),
// return: [displayed output, composed output]
"accept":(headkey,shiftin,altgrin)=>{
let layer = 1*shiftin// + 2*altgrin

View File

@@ -26,32 +26,32 @@ let states = {"keylayouts":[[""],[undefined],
[undefined],
[undefined],
[undefined],
["a","A"],
["b","B"],
["c","C"],
["d","D"],
["e","E"],
["f","F"],
["g","G"],
["h","H"],
["i","I"],
["j","J"],
["k","K"],
["l","L"],
["m","M"],
["n","N"],
["o","O"],
["p","P"],
["q","Q"],
["r","R"],
["s","S"],
["t","T"],
["u","U"],
["v","V"],
["w","W"],
["x","X"],
["y","Y"],
["z","Z"],
["a","A","日"],
["b","B","月"],
["c","C","金"],
["d","D","木"],
["e","E","水"],
["f","F","火"],
["g","G","土"],
["h","H","竹"],
["i","I","戈"],
["j","J","十"],
["k","K","大"],
["l","L","中"],
["m","M","一"],
["n","N","弓"],
["o","O","人"],
["p","P","心"],
["q","Q","手"],
["r","R","口"],
["s","S","尸"],
["t","T","廿"],
["u","U","山"],
["v","V","女"],
["w","W","田"],
["x","X","難"],
["y","Y","卜"],
["z","Z","造"],
["","《"],
["。","》"],
[undefined],
@@ -270,6 +270,7 @@ let getCandidatesUsingBuf = () => {
return `${states.buf},${states.candidates}`
}
return Object.freeze({"n":"五倉正體 Qwerty","v":"many","c":"CuriousTo\uA75Bvald, 倉頡之友 。馬來西亞 http://www.chinesecj.com",
"t":states.keylayouts.map(it => [(it[2]||it[0]),it[1]]),
// return: [displayed output, composed output]
"accept":(headkey,shiftin,altgrin)=>{
let layer = 1*shiftin// + 2*altgrin