コード例 #1
0
ファイル: observerlib.py プロジェクト: dgiunchi/m-nebula
def map_input():
    cwd = npython.psel()
    npython.sel("/sys/servers/input")
    npython.set("beginmap")
    npython.set("map", "keyb0:shift.pressed", "dolly")
    npython.set("map", "keyb0:ctrl.pressed", "orbit")
    npython.set("map", "mouse0:btn0.pressed", "pan")
    npython.set("map", "mouse0:btn1.pressed", "orbit")
    npython.set("map", "mouse0:btn2.pressed", "dolly")
    npython.set("map", "keyb0:space.down", "script:orig()")
    npython.set("map", "keyb0:j.down", "script:janaview()")
    npython.set("map", "keyb0:esc.down", "script:npython.set('/sys/servers/console.toggle')")
    npython.set("endmap")
    npython.sel(cwd)
コード例 #2
0
ファイル: npythontests.py プロジェクト: dgiunchi/m-nebula
 def testUpSelCommand(self):
   # Returns an opaque 'Nebula Object'
   result = npython.sel('..')
   # TODO: Test result object itself
   path = npython.psel()
   assert path == '/'
コード例 #3
0
ファイル: npythontests.py プロジェクト: dgiunchi/m-nebula
 def testPselCommand(self):
   result = npython.psel()
   assert result == '/'