blob: 8dba532f22efe38ac0b5ee20efbed7d3d9b226b1 (
plain) (
blame)
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
|
// Shave and a Haircut
// (c) 2019 Epic Games
// US Patent 6720962
// platform-win32.c -- win32 platform specific stuff
/// you'll need to probably make some changes in valuators.cpp
/// for single mouse buttons on the mac.
/// look at MouseClickFunc
static int
getTAB( void )
{
//#ifndef MAX3D
//#ifndef MAYA3D
// valuator[TABKEY]= (GetAsyncKeyState(VK_TAB)&32768);
//#endif
//#endif
return ( valuator[TABKEY] );
}
static int
getESCAPE( void )
{
#ifndef MAX3D
#ifndef MAYA3D
valuator[ESCKEY] = ( GetAsyncKeyState( VK_ESCAPE ) & 32768 );
#endif
#endif
return ( valuator[ESCKEY] );
}
static int
getSHIFT( void )
{
int tvv = 0;
return ( tvv );
}
static int
getCTRL( void )
{
int tvv = 0;
tvv = ( GetAsyncKeyState( VK_CONTROL ) & 32768 );
return ( tvv );
}
static int
getALT( void )
{
int tvv = 0;
tvv = ( GetAsyncKeyState( 120 ) );
tvv += ( GetAsyncKeyState( 121 ) );
return ( tvv );
}
#ifdef DOESNTWORK
int
getCTRL( void )
{
int rt;
int ret = 0;
char tmp[255];
rt = glutGetModifiers( );
if( rt == GLUT_ACTIVE_CTRL )
ret = 1;
sprintf( tmp, "active = %d", rt );
DRAW_STATUS( tmp );
return ( ret );
}
int
getSHIFT( void )
{
int rt;
int ret = 0;
rt = glutGetModifiers( );
if( rt == GLUT_ACTIVE_SHIFT )
ret = 1;
return ( ret );
}
#endif
|