forked from ISET/isetcam
-
Notifications
You must be signed in to change notification settings - Fork 0
/
vcimageKeyPress.m
65 lines (58 loc) · 1.6 KB
/
vcimageKeyPress.m
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
function vcimageKeyPress
%Define key press meanings for vcimage window (processor)
%
% This routine is identified in the .fig window as determining the meaning
% of key presses
%
% ctrl-P is Compute
% ctrl-D is Delete
% ctrl-L is Load
% ctrl-I is import
% ctrl-R is refresh.
% ctrl-H is help.
%
% Copyright ImagEval Consultants, LLC, 2005.
% Programming notes:
% Read the current key press from the buffer. A control key is empty on first entry. But a
% ctrl-Value gets read properly on second entry.
key = double(get(gcf,'CurrentCharacter'));
if isempty(key), return; end
handles = guihandles;
eventData = [];
hObject = handles.figure1;
switch key
case {127} % Backspace and Delete
case 3 % ctrl-C
case 4 % ctrl-D
vcimageWindow('vcImageDelete',hObject,eventData,handles);
case 5 % ctrl-E
case 6 % ctrl-F
case 7 % ctrl-G
case 8 % ctrl-H
vcimageWindow('menuHelp_Callback',hObject,eventData,handles);
case 9 % ctrl-I
case 10 % ctrl-J
case 11 % ctrl-K
case 12 % ctrl-L
case 13 % ctrl-M
case 14 % ctrl-N
vcimageWindow('menuEditName_Callback',hObject,eventData,handles);
case 15 % ctrl-O
case 16 % ctrl-P
vcimageWindow('btnComputeImage_Callback',hObject,eventData,handles);
case 17 % ctrl-Q
case 18 % ctrl-R
vcimageWindow('vcimageRefresh',hObject,eventData,handles)
case 19 % ctrl-S
case 20 % ctrl-T
case 21 % ctrl-U
case 22 % ctrl-V
case 23 % ctrl-W
case 24 % ctrl-X
case 25 % ctrl-Y
case 26 % ctrl-Z
case 97 % alt-A
otherwise
return;
end
return;