跟踪最后一个按键



我想将我的鼠标按钮映射到我按下的最后一个数字键。

我考虑使用变量跟踪按下的最后一个数字键。

我尝试了

{  
   "from":{  
      "key_code":"0"
   },
   "to":[  
      {  
         "set_variable":{  
            "name":"last_number",
            "value":"0"
         }
      },
      {  
         "key_code":"0"
      }
   ],
   "type":"basic"
},
...
{  
   "conditions":[  
      {  
         "name":"last_number",
         "type":"variable_if",
         "value":"0"
      }
   ],
   "from":{  
      "modifiers":{  
         "optional":[  
            "any"
         ]
      },
      "pointing_button":"button4"
   },
   "to":[  
      {  
         "key_code":"0"
      }
   ],
   "type":"basic"
},
...

但是鼠标按钮永远不会输出任何内容

值必须是数字,将 "0"更改为 0修复了

最新更新