Friday, April 17, 2026

小狼毫直接上屏顿号

 在数据文档夹创建mypunctuator.yaml 

粘贴如下:

config_version: '1.4.1'

punctuator:
  full_shape:
    " " : { commit: " " }
    "," : { commit: , }
    "." : { commit: 。 }
    "<" : [ 《, 〈, «, ‹ ]
    ">" : [ 》, 〉, », › ]
    "/" : [ 、, /, "/", ÷ ]
    "?" : { commit: ? }
    ";" : { commit: ; }
    ":" : :
    "'" : { pair: [ "‘", "’" ] }
    "\"" : { pair: [ "“", "”" ] }
    "\\" : [ 、, \, "\\" ]
    "|" : [ ・, |, "|", "§", "¦" ]
    "`" : [ `, "`" ]
    "~" : [ 〜, "~", ~, 〰 ]
    "!" : { commit: ! }
    "@" : [ @, "@", ☯ ]
    "#" : [ #, "#", ⌘ ]
    "%" : [ %, "%", "°", "℃" ]
    "$" : [ ¥, "$", "€", "£", "¥", "¢", "¤" ]
    "^" : { commit: …… }
    "&" : [ &, "&" ]
    "*" : [ *, "*", ・, ×, ※, ❂, · ]
    "(" : (
    ")" : )
    "-" : [ -, "-" ]
    "_" : ——
    "+" : [ +, "+" ]
    "=" : [ =, "=" ]
    "[" : [ 「, 【, 〔, [ ]
    "]" : [ 」, 】, 〕, ] ]
    "{" : [ 『, 〖, { ]
    "}" : [ 』, 〗, } ]
  half_shape:
    "," : { commit: , }
    "." : { commit: 。 }
    "<" : "《"
    ">" : "》"
    "/" : "/"
    "?" : { commit: ? }
    ";" : { commit: ; }
    ":" : { commit: : }
    "'" : { pair: [ "‘", "’" ] }
    "\"" : { pair: [ "“", "”" ] }
    "\\" : "、"
    "|" : "|"
    "`" : { commit: "`" }
    "~" : ~
    "!" : { commit: ! }
    "@" : "@"
    "#" : "#"
    "%" : %
    "$" : [ ¥, "$", "€", "£", "¥", "¢", "¤" ]
    "^" : { commit: …… }
    "&" : "&"
    "*" : "*"
    "(" : { pair: [ (, ) ] }
    ")" : )
    "-" : -
    "_" : ——
    "+" : "+"
    "=" : "="
    "[" : { pair: [ 【, 】 ] }
    "]" : 】
    "{" : "{"
    "}" : "}"

key_binder:
  bindings:
    # commonly used paging keys
    - { when: composing, accept: ISO_Left_Tab, send: Page_Up }
    - { when: composing, accept: Shift+Tab, send: Page_Up }
    - { when: composing, accept: Tab, send: Page_Down }
    - { when: has_menu, accept: minus, send: Page_Up }
    - { when: has_menu, accept: equal, send: Page_Down }
    - { when: paging, accept: comma, send: Page_Up }
    - { when: has_menu, accept: period, send: Page_Down }
    - { when: paging, accept: bracketleft, send: Page_Up }
    - { when: has_menu, accept: bracketright, send: Page_Down }

在luna_pinyin_simp.custom.yaml写入:

patch:
  punctuator/import_preset: mypunctuator
  key_binder/import_preset: mypunctuator
  recognizer/patterns/punct: '^/([0-9]0?|[A-Za-z]+)$'

 https://www.cnblogs.com/Joynic/p/16409799.html