[{"data":1,"prerenderedAt":1244},["ShallowReactive",2],{"writing":3,"components":19,"work":53,"\u002Fcomponents\u002Fkhmer-keyboard":210},[4,13],{"title":5,"path":6,"description":7,"date":8,"book":9},"The book I wish I read sooner","\u002Fwriting\u002Fthe-book-i-wish-i-read-sooner","Atomic Habits, and why the smallest steps are the ones that change you.","2025-09-10",{"title":10,"author":11,"url":12},"Atomic Habits","James Clear","https:\u002F\u002Fjamesclear.com\u002Fatomic-habits",{"title":14,"path":15,"description":16,"date":17,"book":18},"Hello, world","\u002Fwriting\u002Fhello-world","A new home for the things I build and the small details I care about.","2025-09-09",null,[20,29,38,45],{"title":21,"path":22,"description":23,"tag":24,"icon":25,"new":26,"stem":27,"order":28},"Khmer Keyboard","\u002Fcomponents\u002Fkhmer-keyboard","An on-screen Khmer keyboard that lights up the next key.","input","i-f7-keyboard",true,"components\u002Fkhmer-keyboard",1,{"title":30,"path":31,"description":32,"tag":33,"icon":34,"new":35,"stem":36,"order":37},"Swipe Actions","\u002Fcomponents\u002Fswipe-actions","Swipe a row to reveal actions, like in a phone's mail app.","gesture","i-f7-hand-draw",false,"components\u002Fswipe-actions",2,{"title":39,"path":40,"description":41,"tag":33,"icon":42,"new":35,"stem":43,"order":44},"Card Carousel","\u002Fcomponents\u002Fcard-carousel","Swipe through cards, then open one into a full page.","i-f7-rectangle-stack","components\u002Fcard-carousel",3,{"title":46,"path":47,"description":48,"tag":49,"icon":50,"new":35,"stem":51,"order":52},"KHQR","\u002Fcomponents\u002Fkhqr","A payment card for Cambodia's KHQR, with paid, expired and failed states.","payment","i-f7-qrcode","components\u002Fkhqr",4,[54,86,102,124,142,157,175,192],{"title":55,"path":56,"description":57,"kind":58,"order":28,"status":59,"logo":60,"icon":18,"url":61,"features":62},"Aksar","\u002Fwork\u002Faksar","Free Khmer fonts for the web, with a keyboard and a poster maker.","product","live","\u002Flogos\u002Faksar.svg","https:\u002F\u002Faksar.sothearo.dev",[63,67,70,74,78,82],{"title":64,"text":65,"icon":66},"Every free Khmer font","34 fonts from Google Fonts, Inter Khmer, Khmer Digital, Busra and more, each with its license in plain words.","i-f7-textformat",{"title":68,"text":69,"icon":25},"Try your own words","Type in the font you're looking at, with an on-screen Khmer keyboard that has the coeng key.",{"title":71,"text":72,"icon":73},"Keep the ones you like","Fonts you keep become stickers on a board, so comparing them feels like a desk, not a list.","i-f7-square-stack",{"title":75,"text":76,"icon":77},"Checks that matter","Each font page measures real Khmer lines, suggests a line height and shows how big the web files are.","i-f7-checkmark-seal",{"title":79,"text":80,"icon":81},"Code to copy","HTML, CSS, Tailwind and Nuxt snippets for any font, with pairs that work together.","i-f7-chevron-left-slash-chevron-right",{"title":83,"text":84,"icon":85},"Posters","Turn your words into a poster with frames, stickers and patterns, then save it.","i-f7-photo",{"title":87,"path":88,"description":89,"kind":90,"order":28,"status":59,"logo":18,"icon":91,"url":92,"features":93},"Form Engine","\u002Fwork\u002Fform-engine","Forms written once in TypeScript.","side","i-f7-checkmark-square","https:\u002F\u002Fform.sothearo.dev",[94,98],{"title":95,"text":96,"icon":97},"One schema","Describe a form once and get a step by step wizard with checks built in.","i-f7-doc-text",{"title":99,"text":100,"icon":101},"A playground","Learn by writing real forms in the browser, with no backend to set up.","i-f7-play-rectangle",{"title":103,"path":104,"description":105,"kind":58,"order":37,"status":106,"logo":107,"icon":18,"url":18,"features":108},"Mitai","\u002Fwork\u002Fmitai","Follow anime, K-drama and TV in one list, and see where each one streams.","building","\u002Flogos\u002Fmitai.svg",[109,113,117,121],{"title":110,"text":111,"icon":112},"This week, at a glance","A schedule of what airs each day for everything you follow.","i-f7-calendar",{"title":114,"text":115,"icon":116},"One watching list","Anime, K-drama and TV together, with each episode ticked off as you go.","i-f7-checkmark-alt-circle",{"title":118,"text":119,"icon":120},"Where to watch","See which legal service has a show in Cambodia before you go looking.","i-f7-tv",{"title":122,"text":123,"icon":101},"Your own files","Later, play the episodes you own in a quiet player of its own.",{"title":125,"path":126,"description":127,"kind":90,"order":37,"status":59,"logo":18,"icon":25,"url":128,"features":129},"Quickkeys","\u002Fwork\u002Fquickkeys","Typing practice with rhythm.","https:\u002F\u002Fwpm.sothearo.dev",[130,134,138],{"title":131,"text":132,"icon":133},"Live speed","Words per minute and accuracy as you type, with charts after each test.","i-f7-speedometer",{"title":135,"text":136,"icon":137},"Race friends","Rooms where everyone types the same text at once.","i-f7-person-2",{"title":139,"text":140,"icon":141},"Themes","Make your own colors with a few lines of CSS.","i-f7-paintbrush",{"title":143,"path":144,"description":145,"kind":90,"order":44,"status":59,"logo":18,"icon":146,"url":147,"features":148},"Mint","\u002Fwork\u002Fmint","A quiet expense tracker.","i-f7-chart-pie","https:\u002F\u002Fmint.sothearo.dev",[149,153],{"title":150,"text":151,"icon":152},"Quick to add","Log a spend in a few taps and get back to your day.","i-f7-plus-circle",{"title":154,"text":155,"icon":156},"See where it goes","Simple charts by category and month.","i-f7-chart-bar",{"title":158,"path":159,"description":160,"kind":58,"order":44,"status":106,"logo":161,"icon":18,"url":18,"features":162},"Stage","\u002Fwork\u002Fstage","Slides and your live app on one stage, for demos that feel live.","\u002Flogos\u002Fstage.svg",[163,167,171],{"title":164,"text":165,"icon":166},"Slides and app together","Your live app sits inside a device frame on the slide, so a demo never means switching windows.","i-f7-device-laptop",{"title":168,"text":169,"icon":170},"Magic move","Shared pieces glide from one scene to the next, like Keynote.","i-f7-wand-stars",{"title":172,"text":173,"icon":174},"Present mode","A clean full screen for the room, with notes and what comes next for you.","i-f7-play-circle",{"title":176,"path":177,"description":178,"kind":58,"order":52,"status":106,"logo":179,"icon":18,"url":18,"features":180},"Reel","\u002Fwork\u002Freel","Videos made from code. Write scenes and render them in the browser.","\u002Flogos\u002Freel.svg",[181,184,188],{"title":182,"text":183,"icon":81},"Scenes in code","Write each scene in Vue, React or Markdown on one timeline.",{"title":185,"text":186,"icon":187},"Real motion","Springs and easing from a small frame clock, so every frame is exact.","i-f7-waveform-path",{"title":189,"text":190,"icon":191},"Render in the browser","Export a video right in the tab, or from the command line with ffmpeg.","i-f7-film",{"title":193,"path":194,"description":195,"kind":90,"order":52,"status":59,"logo":18,"icon":196,"url":197,"features":198},"Unmarkdown","\u002Fwork\u002Funmarkdown","A markdown editor in your browser.","i-f7-doc-plaintext","https:\u002F\u002Funmarkdown.sothearo.dev",[199,203,206],{"title":200,"text":201,"icon":202},"Live preview","Rendered markdown beside your text as you type, with code and diagrams.","i-f7-square-split-2x1",{"title":204,"text":205,"icon":25},"Vim and formatting","Toggle Vim keys and tidy a note with one shortcut.",{"title":207,"text":208,"icon":209},"Share by link","The note lives in the link itself, so nothing is stored on a server.","i-f7-link",{"id":211,"title":21,"body":212,"description":23,"extension":1239,"icon":25,"meta":1240,"navigation":26,"new":26,"order":28,"path":22,"rawbody":1241,"seo":1242,"stem":27,"tag":24,"__hash__":1243},"components\u002Fcomponents\u002Fkhmer-keyboard.md",{"type":213,"value":214,"toc":1229},"minimark",[215,220,224,228,232,235,239,449,625,629,639,701,705,806,935,939,1008,1068,1072,1075,1190,1202,1206,1225],[216,217,219],"h2",{"id":218},"preview","Preview",[221,222,223],"p",{},"Type four words. The next key lights up, and your real keyboard works too, even without Khmer installed.",[225,226],"prose-demo",{"name":227},"khmer-keyboard",[216,229,231],{"id":230},"install","Install",[233,234],"prose-install",{"name":227},[216,236,238],{"id":237},"usage","Usage",[240,241,243,255],"prose-framework",{"name":242},"vue",[221,244,245,246,250,251,254],{},"Bind the text with ",[247,248,249],"code",{},"v-model",", and pass the word to type as ",[247,252,253],{},"target",". Its next key lights up, Shift too when it's needed, and delete after a mistake. In Nuxt it's auto-imported, so you can skip the import.",[256,257,262],"pre",{"className":258,"code":259,"filename":260,"language":242,"meta":261,"style":261},"language-vue shiki shiki-themes sothearo-ink-light sothearo-ink-light sothearo-ink-dark","\u003Cscript setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport KhmerKeyboard from \"@\u002Fcomponents\u002Fkhmer-keyboard\u002FKhmerKeyboard.vue\";\n\nconst text = ref(\"\");\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CKhmerKeyboard v-model=\"text\" target=\"សួស្តី\" latin \u002F>\n\u003C\u002Ftemplate>\n","App.vue","",[247,263,264,298,327,346,351,376,386,391,401,440],{"__ignoreMap":261},[265,266,268,272,276,280,283,286,289,293,295],"span",{"class":267,"line":28},"line",[265,269,271],{"class":270},"skAxj","\u003C",[265,273,275],{"class":274},"s5gRC","script",[265,277,279],{"class":278},"sWLoX"," setup",[265,281,282],{"class":278}," lang",[265,284,285],{"class":270},"=",[265,287,288],{"class":270},"\"",[265,290,292],{"class":291},"s0vWP","ts",[265,294,288],{"class":270},[265,296,297],{"class":270},">\n",[265,299,300,304,307,311,314,317,320,322,324],{"class":267,"line":37},[265,301,303],{"class":302},"s1EZa","import",[265,305,306],{"class":270}," {",[265,308,310],{"class":309},"sfWAO"," ref ",[265,312,313],{"class":270},"}",[265,315,316],{"class":302}," from",[265,318,319],{"class":270}," \"",[265,321,242],{"class":291},[265,323,288],{"class":270},[265,325,326],{"class":270},";\n",[265,328,329,331,334,337,339,342,344],{"class":267,"line":44},[265,330,303],{"class":302},[265,332,333],{"class":309}," KhmerKeyboard ",[265,335,336],{"class":302},"from",[265,338,319],{"class":270},[265,340,341],{"class":291},"@\u002Fcomponents\u002Fkhmer-keyboard\u002FKhmerKeyboard.vue",[265,343,288],{"class":270},[265,345,326],{"class":270},[265,347,348],{"class":267,"line":52},[265,349,350],{"emptyLinePlaceholder":26},"\n",[265,352,354,357,361,364,367,370,373],{"class":267,"line":353},5,[265,355,356],{"class":302},"const",[265,358,360],{"class":359},"si8qm"," text",[265,362,363],{"class":270}," =",[265,365,366],{"class":274}," ref",[265,368,369],{"class":270},"(",[265,371,372],{"class":270},"\"\"",[265,374,375],{"class":270},");\n",[265,377,379,382,384],{"class":267,"line":378},6,[265,380,381],{"class":270},"\u003C\u002F",[265,383,275],{"class":274},[265,385,297],{"class":270},[265,387,389],{"class":267,"line":388},7,[265,390,350],{"emptyLinePlaceholder":26},[265,392,394,396,399],{"class":267,"line":393},8,[265,395,271],{"class":270},[265,397,398],{"class":274},"template",[265,400,297],{"class":270},[265,402,404,407,410,413,415,417,420,422,425,427,429,432,434,437],{"class":267,"line":403},9,[265,405,406],{"class":270},"  \u003C",[265,408,409],{"class":274},"KhmerKeyboard",[265,411,412],{"class":278}," v-model",[265,414,285],{"class":270},[265,416,288],{"class":270},[265,418,419],{"class":309},"text",[265,421,288],{"class":270},[265,423,424],{"class":278}," target",[265,426,285],{"class":270},[265,428,288],{"class":270},[265,430,431],{"class":291},"សួស្តី",[265,433,288],{"class":270},[265,435,436],{"class":278}," latin",[265,438,439],{"class":270}," \u002F>\n",[265,441,443,445,447],{"class":267,"line":442},10,[265,444,381],{"class":270},[265,446,398],{"class":274},[265,448,297],{"class":270},[240,450,452,470],{"name":451},"react",[221,453,454,455,458,459,462,463,466,467,469],{},"Pass ",[247,456,457],{},"value"," and ",[247,460,461],{},"onChange",", or ",[247,464,465],{},"defaultValue"," if you don't need to control it. ",[247,468,253],{}," is the word to type. Its next key lights up, Shift too when it's needed, and delete after a mistake.",[256,471,476],{"className":472,"code":473,"filename":474,"language":475,"meta":261,"style":261},"language-tsx shiki shiki-themes sothearo-ink-light sothearo-ink-light sothearo-ink-dark","import { useState } from \"react\";\nimport { KhmerKeyboard } from \"@\u002Fcomponents\u002Fkhmer-keyboard\u002FKhmerKeyboard\";\n\nexport function App() {\n  const [text, setText] = useState(\"\");\n\n  return \u003CKhmerKeyboard value={text} onChange={setText} target=\"សួស្តី\" latin \u002F>;\n}\n","App.tsx","tsx",[247,477,478,499,520,524,541,571,575,620],{"__ignoreMap":261},[265,479,480,482,484,487,489,491,493,495,497],{"class":267,"line":28},[265,481,303],{"class":302},[265,483,306],{"class":270},[265,485,486],{"class":309}," useState ",[265,488,313],{"class":270},[265,490,316],{"class":302},[265,492,319],{"class":270},[265,494,451],{"class":291},[265,496,288],{"class":270},[265,498,326],{"class":270},[265,500,501,503,505,507,509,511,513,516,518],{"class":267,"line":37},[265,502,303],{"class":302},[265,504,306],{"class":270},[265,506,333],{"class":309},[265,508,313],{"class":270},[265,510,316],{"class":302},[265,512,319],{"class":270},[265,514,515],{"class":291},"@\u002Fcomponents\u002Fkhmer-keyboard\u002FKhmerKeyboard",[265,517,288],{"class":270},[265,519,326],{"class":270},[265,521,522],{"class":267,"line":44},[265,523,350],{"emptyLinePlaceholder":26},[265,525,526,529,532,535,538],{"class":267,"line":52},[265,527,528],{"class":302},"export",[265,530,531],{"class":302}," function",[265,533,534],{"class":274}," App",[265,536,537],{"class":270},"()",[265,539,540],{"class":270}," {\n",[265,542,543,546,549,551,554,557,560,562,565,567,569],{"class":267,"line":353},[265,544,545],{"class":302},"  const",[265,547,548],{"class":270}," [",[265,550,419],{"class":359},[265,552,553],{"class":270},",",[265,555,556],{"class":359}," setText",[265,558,559],{"class":270},"]",[265,561,363],{"class":270},[265,563,564],{"class":274}," useState",[265,566,369],{"class":270},[265,568,372],{"class":270},[265,570,375],{"class":270},[265,572,573],{"class":267,"line":378},[265,574,350],{"emptyLinePlaceholder":26},[265,576,577,580,583,585,588,591,593,595,598,600,603,605,607,609,611,613,615,617],{"class":267,"line":388},[265,578,579],{"class":302},"  return",[265,581,582],{"class":270}," \u003C",[265,584,409],{"class":274},[265,586,587],{"class":278}," value",[265,589,590],{"class":270},"={",[265,592,419],{"class":309},[265,594,313],{"class":270},[265,596,597],{"class":278}," onChange",[265,599,590],{"class":270},[265,601,602],{"class":309},"setText",[265,604,313],{"class":270},[265,606,424],{"class":278},[265,608,285],{"class":270},[265,610,288],{"class":270},[265,612,431],{"class":291},[265,614,288],{"class":270},[265,616,436],{"class":278},[265,618,619],{"class":270}," \u002F>;\n",[265,621,622],{"class":267,"line":393},[265,623,624],{"class":270},"}\n",[216,626,628],{"id":627},"typing-test","Typing test",[221,630,631,634,635,638],{},[247,632,633],{},"check"," compares what was typed with the target. It tells you if the text is right so far, if it's done, and which key comes next. Turn on ",[247,636,637],{},"capture"," while your test has focus, and real keys type Khmer even on a computer without a Khmer keyboard.",[256,640,644],{"className":641,"code":642,"filename":643,"language":292,"meta":261,"style":261},"language-ts shiki shiki-themes sothearo-ink-light sothearo-ink-light sothearo-ink-dark","import { check } from \"@\u002Fcomponents\u002Fkhmer-keyboard\u002Fcore\";\n\ncheck(\"សួស្តី\", \"សួ\");\n\u002F\u002F { correct: true, done: false, next: { key: KeyS, shift: false } }\n","lesson.ts",[247,645,646,668,672,695],{"__ignoreMap":261},[265,647,648,650,652,655,657,659,661,664,666],{"class":267,"line":28},[265,649,303],{"class":302},[265,651,306],{"class":270},[265,653,654],{"class":309}," check ",[265,656,313],{"class":270},[265,658,316],{"class":302},[265,660,319],{"class":270},[265,662,663],{"class":291},"@\u002Fcomponents\u002Fkhmer-keyboard\u002Fcore",[265,665,288],{"class":270},[265,667,326],{"class":270},[265,669,670],{"class":267,"line":37},[265,671,350],{"emptyLinePlaceholder":26},[265,673,674,676,678,680,682,684,686,688,691,693],{"class":267,"line":44},[265,675,633],{"class":274},[265,677,369],{"class":270},[265,679,288],{"class":270},[265,681,431],{"class":291},[265,683,288],{"class":270},[265,685,553],{"class":270},[265,687,319],{"class":270},[265,689,690],{"class":291},"សួ",[265,692,288],{"class":270},[265,694,375],{"class":270},[265,696,697],{"class":267,"line":52},[265,698,700],{"class":699},"sCVoR","\u002F\u002F { correct: true, done: false, next: { key: KeyS, shift: false } }\n",[216,702,704],{"id":703},"props","Props",[240,706,707],{"name":242},[708,709,710,729],"table",{},[711,712,713],"thead",{},[714,715,716,720,723,726],"tr",{},[717,718,719],"th",{},"Prop",[717,721,722],{},"Type",[717,724,725],{},"Default",[717,727,728],{},"What it does",[730,731,732,751,766,786],"tbody",{},[714,733,734,739,744,748],{},[735,736,737],"td",{},[247,738,249],{},[735,740,741],{},[247,742,743],{},"string",[735,745,746],{},[247,747,372],{},[735,749,750],{},"The typed text. Keys add to it, delete removes the last character.",[714,752,753,757,761,763],{},[735,754,755],{},[247,756,253],{},[735,758,759],{},[247,760,743],{},[735,762],{},[735,764,765],{},"The word to type. The key to press next lights up.",[714,767,768,773,778,783],{},[735,769,770],{},[247,771,772],{},"latin",[735,774,775],{},[247,776,777],{},"boolean",[735,779,780],{},[247,781,782],{},"false",[735,784,785],{},"Shows the Latin letter in the corner of each key.",[714,787,788,792,796,800],{},[735,789,790],{},[247,791,637],{},[735,793,794],{},[247,795,777],{},[735,797,798],{},[247,799,782],{},[735,801,802,803,805],{},"Real keys type Khmer into ",[247,804,249],{},". Fields and shortcuts are left alone.",[240,807,808],{"name":451},[708,809,810,822],{},[711,811,812],{},[714,813,814,816,818,820],{},[717,815,719],{},[717,817,722],{},[717,819,725],{},[717,821,728],{},[730,823,824,839,856,872,886,902,919],{},[714,825,826,830,834,836],{},[735,827,828],{},[247,829,457],{},[735,831,832],{},[247,833,743],{},[735,835],{},[735,837,838],{},"The typed text, when you control it.",[714,840,841,845,849,853],{},[735,842,843],{},[247,844,465],{},[735,846,847],{},[247,848,743],{},[735,850,851],{},[247,852,372],{},[735,854,855],{},"The starting text, when you don't.",[714,857,858,862,867,869],{},[735,859,860],{},[247,861,461],{},[735,863,864],{},[247,865,866],{},"(value) => void",[735,868],{},[735,870,871],{},"Called with the new text after each key.",[714,873,874,878,882,884],{},[735,875,876],{},[247,877,253],{},[735,879,880],{},[247,881,743],{},[735,883],{},[735,885,765],{},[714,887,888,892,896,900],{},[735,889,890],{},[247,891,772],{},[735,893,894],{},[247,895,777],{},[735,897,898],{},[247,899,782],{},[735,901,785],{},[714,903,904,908,912,916],{},[735,905,906],{},[247,907,637],{},[735,909,910],{},[247,911,777],{},[735,913,914],{},[247,915,782],{},[735,917,918],{},"Real keys type Khmer. Fields and shortcuts are left alone.",[714,920,921,926,930,932],{},[735,922,923],{},[247,924,925],{},"className",[735,927,928],{},[247,929,743],{},[735,931],{},[735,933,934],{},"Added to the keyboard.",[216,936,938],{"id":937},"events-and-slots","Events and slots",[240,940,941],{"name":242},[708,942,943,956],{},[711,944,945],{},[714,946,947,950,953],{},[717,948,949],{},"Name",[717,951,952],{},"Gives you",[717,954,955],{},"When",[730,957,958,972,984],{},[714,959,960,965,969],{},[735,961,962],{},[247,963,964],{},"@press",[735,966,967],{},[247,968,419],{},[735,970,971],{},"A key types something.",[714,973,974,979,981],{},[735,975,976],{},[247,977,978],{},"@backspace",[735,980],{},[735,982,983],{},"Delete is pressed.",[714,985,986,991,1005],{},[735,987,988],{},[247,989,990],{},"#key",[735,992,993,996,997,996,999,996,1002],{},[247,994,995],{},"item",", ",[247,998,419],{},[247,1000,1001],{},"hinted",[247,1003,1004],{},"pressed",[735,1006,1007],{},"Replace what each key shows.",[240,1009,1010],{"name":451},[708,1011,1012,1022],{},[711,1013,1014],{},[714,1015,1016,1018,1020],{},[717,1017,949],{},[717,1019,952],{},[717,1021,955],{},[730,1023,1024,1037,1048],{},[714,1025,1026,1031,1035],{},[735,1027,1028],{},[247,1029,1030],{},"onPress",[735,1032,1033],{},[247,1034,419],{},[735,1036,971],{},[714,1038,1039,1044,1046],{},[735,1040,1041],{},[247,1042,1043],{},"onBackspace",[735,1045],{},[735,1047,983],{},[714,1049,1050,1055,1065],{},[735,1051,1052],{},[247,1053,1054],{},"renderKey",[735,1056,1057,996,1059,996,1061,996,1063],{},[247,1058,995],{},[247,1060,419],{},[247,1062,1001],{},[247,1064,1004],{},[735,1066,1067],{},"Return what each key shows.",[216,1069,1071],{"id":1070},"customise","Customise",[221,1073,1074],{},"Every colour comes from the text colour, so the keyboard fits light and dark themes on its own. Change it with CSS variables, and style states with data attributes.",[256,1076,1081],{"className":1077,"code":1078,"filename":1079,"language":1080,"meta":261,"style":261},"language-css shiki shiki-themes sothearo-ink-light sothearo-ink-light sothearo-ink-dark","[data-khmer-keyboard] {\n  --khmer-keyboard-font: \"Kantumruy Pro\", sans-serif;\n  --khmer-keyboard-gap: 6px;\n  --khmer-keyboard-max-width: 560px;\n}\n\n[data-khmer-keyboard] [data-hint] {\n  --khmer-keyboard-ink: #2f6fed;\n}\n","keyboard.css","css",[247,1082,1083,1095,1117,1132,1146,1150,1154,1171,1186],{"__ignoreMap":261},[265,1084,1085,1088,1091,1093],{"class":267,"line":28},[265,1086,1087],{"class":270},"[",[265,1089,1090],{"class":278},"data-khmer-keyboard",[265,1092,559],{"class":270},[265,1094,540],{"class":270},[265,1096,1097,1100,1103,1105,1108,1110,1112,1115],{"class":267,"line":37},[265,1098,1099],{"class":309},"  --khmer-keyboard-font",[265,1101,1102],{"class":270},":",[265,1104,319],{"class":270},[265,1106,1107],{"class":291},"Kantumruy Pro",[265,1109,288],{"class":270},[265,1111,553],{"class":270},[265,1113,1114],{"class":309}," sans-serif",[265,1116,326],{"class":270},[265,1118,1119,1122,1124,1127,1130],{"class":267,"line":44},[265,1120,1121],{"class":309},"  --khmer-keyboard-gap",[265,1123,1102],{"class":270},[265,1125,1126],{"class":359}," 6",[265,1128,1129],{"class":302},"px",[265,1131,326],{"class":270},[265,1133,1134,1137,1139,1142,1144],{"class":267,"line":52},[265,1135,1136],{"class":309},"  --khmer-keyboard-max-width",[265,1138,1102],{"class":270},[265,1140,1141],{"class":359}," 560",[265,1143,1129],{"class":302},[265,1145,326],{"class":270},[265,1147,1148],{"class":267,"line":353},[265,1149,624],{"class":270},[265,1151,1152],{"class":267,"line":378},[265,1153,350],{"emptyLinePlaceholder":26},[265,1155,1156,1158,1160,1162,1164,1167,1169],{"class":267,"line":388},[265,1157,1087],{"class":270},[265,1159,1090],{"class":278},[265,1161,559],{"class":270},[265,1163,548],{"class":270},[265,1165,1166],{"class":278},"data-hint",[265,1168,559],{"class":270},[265,1170,540],{"class":270},[265,1172,1173,1176,1178,1181,1184],{"class":267,"line":393},[265,1174,1175],{"class":309},"  --khmer-keyboard-ink",[265,1177,1102],{"class":270},[265,1179,1180],{"class":270}," #",[265,1182,1183],{"class":309},"2f6fed",[265,1185,326],{"class":270},[265,1187,1188],{"class":267,"line":403},[265,1189,624],{"class":270},[221,1191,1192,1193,996,1196,458,1198,1201],{},"Keys carry ",[247,1194,1195],{},"data-kind",[247,1197,1166],{},[247,1199,1200],{},"data-pressed",", so you can target one kind of key or one state without new props.",[216,1203,1205],{"id":1204},"accessibility","Accessibility",[1207,1208,1209,1213,1216,1222],"ul",{},[1210,1211,1212],"li",{},"Every key is a real button with a label, so screen readers say the character it types.",[1210,1214,1215],{},"Keys don't take focus when clicked, so the text field keeps it.",[1210,1217,1218,1219,1221],{},"Without ",[247,1220,637],{},", your physical keys only light up. The keyboard never changes what they type.",[1210,1223,1224],{},"Motion turns off when the system asks for reduced motion.",[1226,1227,1228],"style",{},"html pre.shiki code .s1EZa, html code.shiki .s1EZa{--shiki-light:#C4336A;--shiki-default:#C4336A;--shiki-dark:#FF7AB2}html pre.shiki code .skAxj, html code.shiki .skAxj{--shiki-light:#8A8A8A;--shiki-default:#8A8A8A;--shiki-dark:#7A7A7A}html pre.shiki code .sfWAO, html code.shiki .sfWAO{--shiki-light:#2C2C2C;--shiki-default:#2C2C2C;--shiki-dark:#D4D4D4}html pre.shiki code .s0vWP, html code.shiki .s0vWP{--shiki-light:#2F8A5B;--shiki-default:#2F8A5B;--shiki-dark:#7FD1A3}html pre.shiki code .s5gRC, html code.shiki .s5gRC{--shiki-light:#7A4FD1;--shiki-default:#7A4FD1;--shiki-dark:#C3A3FF}html pre.shiki code .sCVoR, html code.shiki .sCVoR{--shiki-light:#9A9A9A;--shiki-light-font-style:italic;--shiki-default:#9A9A9A;--shiki-default-font-style:italic;--shiki-dark:#6E6E6E;--shiki-dark-font-style:italic}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html pre.shiki code .sWLoX, html code.shiki .sWLoX{--shiki-light:#B3611C;--shiki-default:#B3611C;--shiki-dark:#F2B36B}html pre.shiki code .si8qm, html code.shiki .si8qm{--shiki-light:#2F6FD1;--shiki-default:#2F6FD1;--shiki-dark:#7AB8FF}",{"title":261,"searchDepth":37,"depth":37,"links":1230},[1231,1232,1233,1234,1235,1236,1237,1238],{"id":218,"depth":37,"text":219},{"id":230,"depth":37,"text":231},{"id":237,"depth":37,"text":238},{"id":627,"depth":37,"text":628},{"id":703,"depth":37,"text":704},{"id":937,"depth":37,"text":938},{"id":1070,"depth":37,"text":1071},{"id":1204,"depth":37,"text":1205},"md",{},"---\ntitle: Khmer Keyboard\ndescription: An on-screen Khmer keyboard that lights up the next key.\norder: 1\nicon: i-f7-keyboard\ntag: input\nnew: true\n---\n\n## Preview\n\nType four words. The next key lights up, and your real keyboard works too, even without Khmer installed.\n\n::prose-demo{name=\"khmer-keyboard\"}\n::\n\n## Install\n\n::prose-install{name=\"khmer-keyboard\"}\n::\n\n## Usage\n\n::prose-framework{name=\"vue\"}\nBind the text with `v-model`, and pass the word to type as `target`. Its next key lights up, Shift too when it's needed, and delete after a mistake. In Nuxt it's auto-imported, so you can skip the import.\n\n```vue [App.vue]\n\u003Cscript setup lang=\"ts\">\nimport { ref } from \"vue\";\nimport KhmerKeyboard from \"@\u002Fcomponents\u002Fkhmer-keyboard\u002FKhmerKeyboard.vue\";\n\nconst text = ref(\"\");\n\u003C\u002Fscript>\n\n\u003Ctemplate>\n  \u003CKhmerKeyboard v-model=\"text\" target=\"សួស្តី\" latin \u002F>\n\u003C\u002Ftemplate>\n```\n\n::\n\n::prose-framework{name=\"react\"}\nPass `value` and `onChange`, or `defaultValue` if you don't need to control it. `target` is the word to type. Its next key lights up, Shift too when it's needed, and delete after a mistake.\n\n```tsx [App.tsx]\nimport { useState } from \"react\";\nimport { KhmerKeyboard } from \"@\u002Fcomponents\u002Fkhmer-keyboard\u002FKhmerKeyboard\";\n\nexport function App() {\n  const [text, setText] = useState(\"\");\n\n  return \u003CKhmerKeyboard value={text} onChange={setText} target=\"សួស្តី\" latin \u002F>;\n}\n```\n\n::\n\n## Typing test\n\n`check` compares what was typed with the target. It tells you if the text is right so far, if it's done, and which key comes next. Turn on `capture` while your test has focus, and real keys type Khmer even on a computer without a Khmer keyboard.\n\n```ts [lesson.ts]\nimport { check } from \"@\u002Fcomponents\u002Fkhmer-keyboard\u002Fcore\";\n\ncheck(\"សួស្តី\", \"សួ\");\n\u002F\u002F { correct: true, done: false, next: { key: KeyS, shift: false } }\n```\n\n## Props\n\n::prose-framework{name=\"vue\"}\n\n| Prop      | Type      | Default | What it does                                                              |\n| --------- | --------- | ------- | ------------------------------------------------------------------------- |\n| `v-model` | `string`  | `\"\"`    | The typed text. Keys add to it, delete removes the last character.        |\n| `target`  | `string`  |         | The word to type. The key to press next lights up.                        |\n| `latin`   | `boolean` | `false` | Shows the Latin letter in the corner of each key.                         |\n| `capture` | `boolean` | `false` | Real keys type Khmer into `v-model`. Fields and shortcuts are left alone. |\n\n::\n\n::prose-framework{name=\"react\"}\n\n| Prop           | Type              | Default | What it does                                               |\n| -------------- | ----------------- | ------- | ---------------------------------------------------------- |\n| `value`        | `string`          |         | The typed text, when you control it.                       |\n| `defaultValue` | `string`          | `\"\"`    | The starting text, when you don't.                         |\n| `onChange`     | `(value) => void` |         | Called with the new text after each key.                   |\n| `target`       | `string`          |         | The word to type. The key to press next lights up.         |\n| `latin`        | `boolean`         | `false` | Shows the Latin letter in the corner of each key.          |\n| `capture`      | `boolean`         | `false` | Real keys type Khmer. Fields and shortcuts are left alone. |\n| `className`    | `string`          |         | Added to the keyboard.                                     |\n\n::\n\n## Events and slots\n\n::prose-framework{name=\"vue\"}\n\n| Name         | Gives you                           | When                         |\n| ------------ | ----------------------------------- | ---------------------------- |\n| `@press`     | `text`                              | A key types something.       |\n| `@backspace` |                                     | Delete is pressed.           |\n| `#key`       | `item`, `text`, `hinted`, `pressed` | Replace what each key shows. |\n\n::\n\n::prose-framework{name=\"react\"}\n\n| Name          | Gives you                           | When                        |\n| ------------- | ----------------------------------- | --------------------------- |\n| `onPress`     | `text`                              | A key types something.      |\n| `onBackspace` |                                     | Delete is pressed.          |\n| `renderKey`   | `item`, `text`, `hinted`, `pressed` | Return what each key shows. |\n\n::\n\n## Customise\n\nEvery colour comes from the text colour, so the keyboard fits light and dark themes on its own. Change it with CSS variables, and style states with data attributes.\n\n```css [keyboard.css]\n[data-khmer-keyboard] {\n  --khmer-keyboard-font: \"Kantumruy Pro\", sans-serif;\n  --khmer-keyboard-gap: 6px;\n  --khmer-keyboard-max-width: 560px;\n}\n\n[data-khmer-keyboard] [data-hint] {\n  --khmer-keyboard-ink: #2f6fed;\n}\n```\n\nKeys carry `data-kind`, `data-hint` and `data-pressed`, so you can target one kind of key or one state without new props.\n\n## Accessibility\n\n- Every key is a real button with a label, so screen readers say the character it types.\n- Keys don't take focus when clicked, so the text field keeps it.\n- Without `capture`, your physical keys only light up. The keyboard never changes what they type.\n- Motion turns off when the system asks for reduced motion.\n",{"title":21,"description":23},"7jZJ1yy8LtKHdCNijH75m3ebzsSduDKE9e9g6c4pvMg",1795439722729]