Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --BASE
- clear()
- lmc_print_devices()
- -- // Define Photoshop //
- lmc_device_set_name('PHOTOSHOP', '14D342ED')
- sendToAHK = function (key)
- local file = io.open("D:\\..2nd keyboard\\keypressed.txt", "w")
- file:write(key)
- file:flush()
- file:close()
- lmc_send_keys('{F23}')
- end
- local config = {
- [45] = "insert2",
- [36] = "home2",
- [33] = "pageup2",
- [46] = "delete2",
- [35] = "end2",
- [34] = "pagedown2",
- [27] = "escape2",
- [112] = "2F1",
- [113] = "2F2",
- [114] = "2F3",
- [115] = "2F4",
- [116] = "2F5",
- [117] = "2F6",
- [118] = "2F7",
- [119] = "2F8",
- [120] = "2F9",
- [121] = "2F10",
- [122] = "2F11",
- [123] = "2F12",
- [8] = "2backspace",
- [220] = "2backslash",
- [13] = "2enter",
- [16] = "2rShift",
- [17] = "2rCtrl",
- [38] = "2up",
- [37] = "2left",
- [40] = "2down",
- [39] = "2right",
- [32] = "2space",
- [186] = "2semicolon",
- [222] = "2singlequote",
- [190] = "2period",
- [191] = "2slash",
- [188] = "2comma",
- [219] = "2leftbracket",
- [221] = "2rightbracket",
- [189] = "2minus",
- [187] = "2equals",
- [96] = "2num0",
- [97] = "2num1",
- [98] = "2num2",
- [99] = "2num3",
- [100] = "2num4",
- [101] = "2num5",
- [102] = "2num6",
- [103] = "2num7",
- [104] = "2num8",
- [105] = "2num9",
- [106] = "2numMult",
- [107] = "2numDelete",
- [109] = "2numMult",
- [110] = "2numDelete",
- [111] = "2numDiv",
- [144] = "2numLock",
- [192] = "2`",
- [9] = "2tab",
- [20] = "2capslock",
- [18] = "2alt",
- [string.byte('Q')] = "2q",
- [string.byte('W')] = "2w",
- [string.byte('E')] = "2e",
- [string.byte('R')] = "2r",
- [string.byte('T')] = "2t",
- [string.byte('Y')] = "2y",
- [string.byte('U')] = "2u",
- [string.byte('I')] = "2i",
- [string.byte('O')] = "2o",
- [string.byte('P')] = "2p",
- [string.byte('A')] = "2a",
- [string.byte('S')] = "2s",
- [string.byte('D')] = "2d",
- [string.byte('F')] = "2f",
- [string.byte('G')] = "2g",
- [string.byte('H')] = "2h",
- [string.byte('J')] = "2j",
- [string.byte('K')] = "2k",
- [string.byte('L')] = "2l",
- [string.byte('Z')] = "2z",
- [string.byte('X')] = "2x",
- [string.byte('C')] = "2c",
- [string.byte('V')] = "2v",
- [string.byte('B')] = "2b",
- [string.byte('N')] = "2n",
- [string.byte('M')] = "2m",
- [string.byte('0')] = "0a",
- [string.byte('1')] = "1a",
- [string.byte('2')] = "2a",
- [string.byte('3')] = "3a",
- [string.byte('4')] = "4a",
- [string.byte('5')] = "5a",
- [string.byte('6')] = "6a",
- [string.byte('7')] = "7a",
- [string.byte('8')] = "8a",
- [string.byte('9')] = "9a",
- --[255] = "printscreen" --these keys do not work
- }
- lmc_set_handler('PHOTOSHOP', function(button, direction)
- if (direction == 1) then return end
- if type(config[button]) == "string" then
- print(' ')
- print('2Your key ID number is: ' .. button)
- print('2It was assigned string: ' .. config[button])
- sendToAHK(config[button])
- else
- print(' ')
- print('2Not yet assigned: ' .. button)
- end
- end)
- -- // Define Premiere //
- lmc_device_set_name('PREMIERE', '8AB8035')
- sendToAHK = function (key)
- local file = io.open("D:\\..2nd keyboard\\keypressed2.txt", "w")
- file:write(key)
- file:flush()
- file:close()
- lmc_send_keys('{F24}')
- end
- local config = {
- [45] = "insert",
- [36] = "home",
- [33] = "pageup",
- [46] = "delete",
- [35] = "end",
- [34] = "pagedown",
- [27] = "escape",
- [112] = "F1",
- [113] = "F2",
- [114] = "F3",
- [115] = "F4",
- [116] = "F5",
- [117] = "F6",
- [118] = "F7",
- [119] = "F8",
- [120] = "F9",
- [121] = "F10",
- [122] = "F11",
- [123] = "F12",
- [8] = "backspace",
- [220] = "backslash",
- [13] = "enter",
- [16] = "rShift",
- [17] = "rCtrl",
- [38] = "up",
- [37] = "left",
- [40] = "down",
- [39] = "right",
- [32] = "space",
- [186] = "semicolon",
- [222] = "singlequote",
- [190] = "period",
- [191] = "slash",
- [188] = "comma",
- [219] = "leftbracket",
- [221] = "rightbracket",
- [189] = "minus",
- [187] = "equals",
- [96] = "num0",
- [97] = "num1",
- [98] = "num2",
- [99] = "num3",
- [100] = "num4",
- [101] = "num5",
- [102] = "num6",
- [103] = "num7",
- [104] = "num8",
- [105] = "num9",
- [106] = "numMult",
- [107] = "numDelete",
- [109] = "numMult",
- [110] = "numDelete",
- [111] = "numDiv",
- [144] = "numLock",
- [192] = "`",
- [9] = "tab",
- [20] = "capslock",
- [18] = "alt",
- [string.byte('Q')] = "q",
- [string.byte('W')] = "w",
- [string.byte('E')] = "e",
- [string.byte('R')] = "r",
- [string.byte('T')] = "t",
- [string.byte('Y')] = "y",
- [string.byte('U')] = "u",
- [string.byte('I')] = "i",
- [string.byte('O')] = "o",
- [string.byte('P')] = "p",
- [string.byte('A')] = "a",
- [string.byte('S')] = "s",
- [string.byte('D')] = "d",
- [string.byte('F')] = "f",
- [string.byte('G')] = "g",
- [string.byte('H')] = "h",
- [string.byte('J')] = "j",
- [string.byte('K')] = "k",
- [string.byte('L')] = "l",
- [string.byte('Z')] = "z",
- [string.byte('X')] = "x",
- [string.byte('C')] = "c",
- [string.byte('V')] = "v",
- [string.byte('B')] = "b",
- [string.byte('N')] = "n",
- [string.byte('M')] = "m",
- [string.byte('0')] = "0",
- [string.byte('1')] = "1",
- [string.byte('2')] = "2",
- [string.byte('3')] = "3",
- [string.byte('4')] = "4",
- [string.byte('5')] = "5",
- [string.byte('6')] = "6",
- [string.byte('7')] = "7",
- [string.byte('8')] = "8",
- [string.byte('9')] = "9",
- --[255] = "printscreen" --these keys do not work
- }
- lmc_set_handler('PREMIERE', function(button, direction)
- if (direction == 1) then return end
- if type(config[button]) == "string" then
- print(' ')
- print('1Your key ID number is: ' .. button)
- print('1It was assigned string: ' .. config[button])
- sendToAHK(config[button])
- else
- print(' ')
- print('1Not yet assigned: ' .. button)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement