Shewer Lu
Shewer Lu
可以用 KP_0 - 9 來隔離 0~9 保留可選字的 功能( 正常 0~9 KP_0~9 都可選字) ```lua -- hspnz 筆劃 1 2 3 4 5 local mapkey= {"h","s","p","n","z"} -- 1 ~ 5 function func(key,env)...
lua_processor 可以實現 改 context.input ,只是範例 只要改掉 context.input 會重新整理 ContextReg 關於 input func context:push( string ) -- 加字串 --> context.input = context.input .. string context.input = string -- 全換
https://github.com/hchunhui/librime-lua/blob/7bbf79ddda9a07b671b9bf0e94d6d6e94decaeab/src/types.cc#L360 如果只截下 ascii ,在處理前 pass 組合鍵 ```lua if key:ctrl() or key:alt() or key:release() or key:super() then return Noop end
沒必要吧 , 沒有RimeSessionId 拿不到 context ```c++ //src/rime_api.h:660: Bool (*set_input)(RimeSessionId session_id, const char* input); //src/rime_api.cc RIME_API Bool RimeSetInput(RimeSessionId session_id, const char* input) { an session(Service::instance().GetSession(session_id)); if (!session) return False; Context* ctx...
哇 用 luajit
重置不是 librime 自身的功能嗎?? lua 如果沒有 用 option_update_notify:connect() , 應該以方案設置爲主吧 在default.yaml save_options: 不知道有沒有影響
engine.cc(281) InitializeComponents(); ApplySchema()(#270) 變更方案 也是 call InitializeComponents();(#276) 重置方案 在導入 engine/processors(#300) 前 ,有個 Switch (#287)先 載入 ,lua component 蛓入晚於 switch 設置 所以 reset option 狀態 應該也在前 ·
```lua function M.func(input,seg, env) local t= Translation( function() print("--------------first" ) for i=1,5 do print("------>", i) local cand= Candidate( "test", seg.start,seg._end, tostring(i), "first") yield(cand) end信息 end) local tt=t:pipe(function(tran)
如果是在英文模式 建議用 以下 APP 1 用 atext or autohotkey 2 不了 输入编码之后 中打? coding? 自動送 End 3 同上 且 Ctrl+z 在 librime-lua 下有點難 Keyevent 都在 processor/key_binder 但是 要有触發 librime-lua 好像沒有...
已經PR了 還有 global rime_api table user_dir() shared_dir() sync_dir() 取得 相關路逕. process_key 在 commit_notifier() 中無效 ctx->commit() 有 clear() 送出後 馬上會被清除