trime icon indicating copy to clipboard operation
trime copied to clipboard

主题文件中的longclick无法正常使用花括号{}语法

Open Newdea opened this issue 7 months ago • 0 comments

摘要 / Summary

有些长按和上滑的按键,键帽显示内容想自定义,就使用了以下写法,但有些能正常显示及使用,有些显示及使用就不正常

重现步骤 / Steps to Reproduce

在主题文件的按键布局的keys内 可以正常显示及使用的:

      - {click: '-', label: '-', hint: '_', width: 10, long_click: { text: '#', label: '# !'}, swipe_up: '!', swipe_down: '_', composing: pie }     
    # 2nd line
      - {click: ,, label: ',', width: 11, long_click: {text: ':', label: ': ;'}, swipe_up: ';', composing: shu }    

显示使用异常的, 键帽长按显示位置显示的是长按对应的花括号内容 { label= (), text= ()}, 长按后上屏的是 { label= (), text= }, 其中text=} 在候选区,光标位置在}前 预期应是显示label对应的值即(), 长按后上屏text对应的定义(), 光标位置在()中间:

      - {click: C, label: 'C D', width: 18, long_click: { text: '(){Left}', label: '()[]()'}, swipe_left: '(', swipe_right: ')', swipe_up: '[](){Left}'}    

完整主题文件

wenfeng.trime.yaml.zip

预期行为 / Expected Behavior

预期应是显示label对应的值, 长按后上屏text对应的定义

日志 / Log

No response

截图 / Screenshot

No response

附加信息 / Additional Context

No response

系统版本 / OS Version

安卓13

应用版本 / App Version

com.osfans.trime-nightly-0-g9b398b07-arm64-v8a-release.apk

构建信息 / Build Information

Builder: Nightly CI Git Repo: https://github.com/osfans/trime Build Git Hash: 9b398b079412564efa12ade42bedf5a806c5efa7 Build Time: May 24, 2025 00:07:14

Newdea avatar May 25 '25 09:05 Newdea