~ubuntu-branches/ubuntu/gutsy/blender/gutsy-security

« back to all changes in this revision

Viewing changes to source/gameengine/PyDoc/SCA_KeyboardSensor.py

  • Committer: Bazaar Package Importer
  • Author(s): Florian Ernst
  • Date: 2005-11-06 12:40:03 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20051106124003-3pgs7tcg5rox96xg
Tags: 2.37a-1.1
* Non-maintainer upload.
* Split out parts of 01_SConstruct_debian.dpatch again: root_build_dir
  really needs to get adjusted before the clean target runs - closes: #333958,
  see #288882 for reference

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# $Id: SCA_KeyboardSensor.py,v 1.3 2004/06/26 09:15:40 kester Exp $
 
2
# Documentation for SCA_KeyboardSensor
 
3
from SCA_ISensor import *
 
4
 
 
5
class SCA_KeyboardSensor(SCA_ISensor):
 
6
        """
 
7
        A keyboard sensor detects player key presses.
 
8
        
 
9
        See module L{GameKeys} for keycode values.
 
10
        """
 
11
        
 
12
        def getKey():
 
13
                """
 
14
                Returns the key code this sensor is looking for.
 
15
                """
 
16
        
 
17
        def setKey(keycode):
 
18
                """
 
19
                Set the key this sensor should listen for.
 
20
                
 
21
                @type keycode: keycode from L{GameKeys} module
 
22
                """
 
23
        
 
24
        def getHold1():
 
25
                """
 
26
                Returns the key code for the first modifier this sensor is looking for.
 
27
                """
 
28
        
 
29
        def setHold1():
 
30
                """
 
31
                Sets the key code for the first modifier this sensor should look for.
 
32
                """
 
33
        
 
34
        def getHold2():
 
35
                """
 
36
                Returns the key code for the second modifier this sensor is looking for.
 
37
                """
 
38
        
 
39
        def setHold2():
 
40
                """
 
41
                Sets the key code for the second modifier this sensor should look for.
 
42
                """
 
43
        
 
44
        def getPressedKeys():
 
45
                """
 
46
                Get a list of keys that have either been pressed, or just released this frame.
 
47
                
 
48
                @rtype: list of key status. [[keycode, status]]
 
49
                """
 
50
        
 
51
        def getCurrentlyPressedKeys():
 
52
                """
 
53
                Get a list of currently pressed keys that have either been pressed, or just released
 
54
                
 
55
                @rtype: list of key status. [[keycode, status]]
 
56
                """
 
57
        
 
58