Bashwy

keyboard lock

Apr 20th, 2022
119
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.48 KB | None | 0 0
  1. {
  2. "description": "keyboard lock",
  3. "manipulators": [
  4. {
  5. "conditions": [
  6. {
  7. "name": "no_type",
  8. "type": "variable_if",
  9. "value": 0
  10. },
  11. {
  12. "bundle_identifiers": [
  13. "com.apple.loginwindow"
  14. ],
  15. "type": "frontmost_application_unless"
  16. }
  17. ],
  18. "from": {
  19. "key_code": "l",
  20. "modifiers": {
  21. "mandatory": [
  22. "command",
  23. "option",
  24. "control"
  25. ],
  26. "optional": [
  27. "caps_lock"
  28. ]
  29. }
  30. },
  31. "to": [
  32. {
  33. "set_variable": {
  34. "name": "no_type",
  35. "value": 1
  36. }
  37. },
  38. {
  39. "shell_command": "osascript -e beep;osascript -e beep"
  40. }
  41. ],
  42. "type": "basic"
  43. },
  44. {
  45. "conditions": [
  46. {
  47. "name": "no_type",
  48. "type": "variable_if",
  49. "value": 1
  50. }
  51. ],
  52. "from": {
  53. "key_code": "escape",
  54. "modifiers": {
  55. "mandatory": [
  56. "right_command"
  57. ],
  58. "optional": [
  59. "caps_lock"
  60. ]
  61. }
  62. },
  63. "parameters": {
  64. "basic.to_if_held_down_threshold_milliseconds": 1000
  65. },
  66. "to_if_held_down": [
  67. {
  68. "set_variable": {
  69. "name": "no_type",
  70. "value": 0
  71. }
  72. },
  73. {
  74. "shell_command": "osascript -e beep"
  75. }
  76. ],
  77. "type": "basic"
  78. },
  79. {
  80. "conditions": [
  81. {
  82. "name": "no_type",
  83. "type": "variable_if",
  84. "value": 1
  85. }
  86. ],
  87. "from": {
  88. "key_code": "right_command",
  89. "modifiers": {
  90. "optional": [
  91. "caps_lock"
  92. ]
  93. }
  94. },
  95. "parameters": {
  96. "basic.to_if_alone_timeout_milliseconds": 250,
  97. "basic.to_if_held_down_threshold_milliseconds": 250
  98. },
  99. "to": [
  100. {
  101. "key_code": "out"
  102. }
  103. ],
  104. "to_if_held_down": [
  105. {
  106. "key_code": "right_command"
  107. }
  108. ],
  109. "type": "basic"
  110. },
  111. {
  112. "conditions": [
  113. {
  114. "name": "no_type",
  115. "type": "variable_if",
  116. "value": 1
  117. },
  118. {
  119. "bundle_identifiers": [
  120. "com.apple.loginwindow"
  121. ],
  122. "type": "frontmost_application_unless"
  123. }
  124. ],
  125. "from": {
  126. "any": "key_code",
  127. "modifiers": {
  128. "optional": [
  129. "any"
  130. ]
  131. }
  132. },
  133. "to": [
  134. {
  135. "key_code": "out"
  136. }
  137. ],
  138. "type": "basic"
  139. },
  140. {
  141. "conditions": [
  142. {
  143. "name": "no_type",
  144. "type": "variable_if",
  145. "value": 1
  146. },
  147. {
  148. "bundle_identifiers": [
  149. "com.apple.loginwindow"
  150. ],
  151. "type": "frontmost_application_unless"
  152. }
  153. ],
  154. "from": {
  155. "apple_vendor_top_case_key_code": "keyboard_fn",
  156. "modifiers": {
  157. "optional": [
  158. "any"
  159. ]
  160. }
  161. },
  162. "to": [
  163. {
  164. "key_code": "out"
  165. }
  166. ],
  167. "type": "basic"
  168. },
  169. {
  170. "conditions": [
  171. {
  172. "name": "no_type",
  173. "type": "variable_if",
  174. "value": 1
  175. },
  176. {
  177. "bundle_identifiers": [
  178. "com.apple.loginwindow"
  179. ],
  180. "type": "frontmost_application_unless"
  181. }
  182. ],
  183. "from": {
  184. "any": "consumer_key_code",
  185. "modifiers": {
  186. "optional": [
  187. "any"
  188. ]
  189. }
  190. },
  191. "to": [
  192. {
  193. "key_code": "out"
  194. }
  195. ],
  196. "type": "basic"
  197. }
  198. ]
  199. }
Advertisement
Add Comment
Please, Sign In to add comment