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

@@ -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