mirror of https://github.com/einverne/dotfiles.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
16 lines
458 B
16 lines
458 B
4 years ago
|
|
||
|
log = hs.logger.new('autoscript', 'debug')
|
||
|
|
||
|
function keyboardCallback(data)
|
||
|
-- if data.eventType == "added" then
|
||
|
-- log.i(data.productName .. data.vendorName .. data.vendorID .. data.productID .. "added")
|
||
|
-- end
|
||
|
-- if data.eventType == "removed" then
|
||
|
-- log.i(data.productName .. data.vendorName .. data.vendorID .. data.productID .. "removed")
|
||
|
-- end
|
||
|
log.i(data)
|
||
|
end
|
||
|
|
||
|
local keyboardWatcher = hs.usb.watcher.new(keyboardCallback)
|
||
|
keyboardWatcher:start()
|