예제 #1
0
    def __init__(self):
        Component.__init__(self)
        """
        This dictionary has the keyboard commands, well the
        event ids for different keys that are currently enabled
        on the python side.
        
        (KEY_ID, MOD_ID): methodToCall()
        """
        self.keymap = {
            (OIS_KEY_PERIOD, OIS_KEY_ALT):
            self.run_commandpy,
            #(OIS_KEY_M, OIS_KEY_ALT): self.toggle_editgui,
            (OIS_KEY_BACKSPACE, OIS_KEY_ALT):
            self.restart_modulemanager
        }
        """
        These are the input events as they have already been translated within Naali internals.
        For example both 'w' and 'uparrow' keypresses cause a MoveForwardPressed input event.
        """
        self.inputmap = {
            r.PyRestart: self.restart_modulemanager,
            r.PyRunCommand: self.run_commandpy
            #r.MoveForwardPressed: self.overrideForwardWalking #overrides the moveforward event
        }

        #XXX a temp hack to have restart work in login screen / ether too
        uiview = r.getUiView()
        uiview.connect("PythonRestartRequest()", self.restart_modulemanager)
예제 #2
0
    def __init__(self):
        Component.__init__(self)
        """
        This dictionary has the keyboard commands, well the
        event ids for different keys that are currently enabled
        on the python side.
        
        (KEY_ID, MOD_ID): methodToCall()
        """
        self.keymap = {
            (OIS_KEY_PERIOD, OIS_KEY_ALT): self.run_commandpy,
            #(OIS_KEY_M, OIS_KEY_ALT): self.toggle_editgui,
            (OIS_KEY_BACKSPACE, OIS_KEY_ALT): self.restart_modulemanager
        }
        
        """
        These are the input events as they have already been translated within Naali internals.
        For example both 'w' and 'uparrow' keypresses cause a MoveForwardPressed input event.
        """
        self.inputmap = {
            r.PyRestart: self.restart_modulemanager,
            r.PyRunCommand: self.run_commandpy
            #r.MoveForwardPressed: self.overrideForwardWalking #overrides the moveforward event
        }

        #XXX a temp hack to have restart work in login screen / ether too
        uiview = r.getUiView()
        uiview.connect("PythonRestartRequest()", self.restart_modulemanager)
예제 #3
0
파일: keycommands.py 프로젝트: Chiru/naali
    def __init__(self):
        Component.__init__(self)
        """
        This dictionary has the keyboard commands, well the
        event ids for different keys that are currently enabled
        on the python side. Now using qt input constants.
        
        (KEY_ID, MOD_ID): methodToCall()
        """

        self.inputmap = {
            (Qt.Key_Period, Qt.AltModifier): self.run_commandpy,
            (Qt.Key_F11, Qt.NoModifier): self.restart_modulemanager
            }
            #r.MoveForwardPressed: self.overrideForwardWalking #overrides the moveforward event

        inputcontext.connect('KeyPressed(KeyEvent*)', self.on_keypressed)
        #XXX a temp hack to have restart work in login screen / ether too
        uiview = r.getUiView()
        uiview.connect('PythonRestartRequest()', self.restart_modulemanager)
예제 #4
0
    def __init__(self):
        Component.__init__(self)
        """
        This dictionary has the keyboard commands, well the
        event ids for different keys that are currently enabled
        on the python side. Now using qt input constants.
        
        (KEY_ID, MOD_ID): methodToCall()
        """

        self.inputmap = {
            (Qt.Key_Period, Qt.AltModifier): self.run_commandpy,
            (Qt.Key_F11, Qt.NoModifier): self.restart_modulemanager
        }
        #r.MoveForwardPressed: self.overrideForwardWalking #overrides the moveforward event

        inputcontext.connect('KeyPressed(KeyEvent*)', self.on_keypressed)
        #XXX a temp hack to have restart work in login screen / ether too
        uiview = r.getUiView()
        uiview.connect('PythonRestartRequest()', self.restart_modulemanager)