forked from Abrimaal/IrfanView-Unified-Remote
-
Notifications
You must be signed in to change notification settings - Fork 0
/
remote.lua
132 lines (111 loc) · 2.78 KB
/
remote.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
local keyboard = libs.keyboard;
------------------------------------------------
-- Browser
------------------------------------------------
--@help open folder
actions.open_dir = function()
keyboard.stroke("ctrl","b");
end
------------------------------------------------
-- Playback
------------------------------------------------
--@help previous image
actions.play_prev = function()
keyboard.stroke("backspace");
end
--@help next image
actions.play_next = function()
keyboard.stroke("space");
end
--@help fullscreen
actions.fullscreen = function()
keyboard.stroke("enter");
end
--@help exit program unused
actions.exit = function()
keyboard.stroke("alt", "f4");
end
------------------------------------------------
-- Cursor navigation
------------------------------------------------
--@help left
actions.cur_left = function()
keyboard.stroke("left");
end
--@help right
actions.cur_right = function()
keyboard.stroke("right");
end
--@help up
actions.cur_up = function()
keyboard.stroke("up");
end
--@help down
actions.cur_down = function()
keyboard.stroke("down");
end
------------------------------------------------
-- Zoom
------------------------------------------------
--@help zoom out
actions.zoom_out = function()
keyboard.stroke("oem_minus");
end
--@help zoom in
actions.zoom_in = function()
keyboard.stroke("oem_plus");
end
------------------------------------------------
-- Rotate
------------------------------------------------
--@help rotate Left
actions.rotate_left = function()
keyboard.text("l");
end
--@help rotate right
actions.rotate_right= function()
keyboard.text("r");
end
--@help flip horizontal
actions.mirror_h = function()
keyboard.stroke("h");
end
--@help flip vertical
actions.mirror_v = function()
keyboard.stroke("v");
end
------------------------------------------------
-- Image adjust
------------------------------------------------
--@help greyscale
actions.greyscale = function()
keyboard.stroke("ctrl","g");
end
--@help darken
actions.darken = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","pgup","pgup","enter");
end
--@help brighten
actions.brighten = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","pgdown","pgdown","enter");
end
--@help less colour
actions.desat = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","tab","tab","pgup","pgup","pgup","pgup","pgup","pgup","enter");
end
--@help more colour
actions.sat = function()
keyboard.stroke("shift","g");
keyboard.press("tab","tab","tab","tab","tab","tab","pgdown","pgdown","pgdown","pgdown","pgdown","pgdown","enter");
end
--@help random_img
actions.random_img = function()
keyboard.stroke("ctrl","m");
end
--@help reload original image
actions.reload = function()
keyboard.stroke("shift","r");
end