Skip to content

Instantly share code, notes, and snippets.

@moskytw
Last active October 14, 2019 01:02
Show Gist options
  • Save moskytw/0d34cb185da8b148006aaa8f22b72250 to your computer and use it in GitHub Desktop.
Save moskytw/0d34cb185da8b148006aaa8f22b72250 to your computer and use it in GitHub Desktop.
{
"title": "Kill unexpectedly repeated return_or_enter",
"rules": [
{
"description": "Map the repeated return_or_enter in 100 ms to none",
"manipulators": [
{
"type": "basic",
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": [
],
"optional": [
"any"
]
}
},
"conditions": [
{
"type": "variable_if",
"name": "return_or_enter pressed",
"value": 1
}
],
"to": [
]
},
{
"type": "basic",
"parameters": {
"basic.to_delayed_action_delay_milliseconds": 100
},
"from": {
"key_code": "return_or_enter",
"modifiers": {
"mandatory": [
],
"optional": [
"any"
]
}
},
"to": [
{
"set_variable": {
"name": "return_or_enter pressed",
"value": 1
}
},
{
"key_code": "return_or_enter"
}
],
"to_delayed_action": {
"to_if_invoked": [
{
"set_variable": {
"name": "return_or_enter pressed",
"value": 0
}
}
],
"to_if_canceled": [
{
"set_variable": {
"name": "return_or_enter pressed",
"value": 0
}
}
]
}
}
]
}
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment