hotkeys are now lowercase

This commit is contained in:
David Rose 2002-02-19 17:46:43 +00:00
parent f640088746
commit 36e47efb6f
2 changed files with 11 additions and 2 deletions

View File

@ -158,8 +158,8 @@ class DirectSession(PandaObject):
'shift', 'shift-up', 'alt', 'alt-up',
'page_up', 'page_down',
'[', '{', ']', '}',
'shift-a', 'b', 'l', 'L', 'o', 'p', 'r', 'shift-r',
's', 't', 'v', 'w']
'shift-a', 'b', 'l', 'shift-l', 'o', 'p', 'r',
'shift-r', 's', 't', 'v', 'w']
self.mouseEvents = ['mouse1', 'mouse1-up',
'mouse2', 'mouse2-up',
'mouse3', 'mouse3-up']

View File

@ -352,8 +352,17 @@ class ShowBase:
self.mouse2cam.node().setArc(self.camera.arc())
self.useDrive()
# A ButtonThrower to generate events from the mouse and
# keyboard buttons as they are pressed.
self.buttonThrower = self.mouseWatcher.attachNewNode(ButtonThrower())
# Specialize the events based on whether the modifier keys are
# being held down.
mods = ModifierButtons()
mods.addButton(KeyboardButton.shift())
mods.addButton(KeyboardButton.control())
mods.addButton(KeyboardButton.alt())
self.buttonThrower.node().setModifierButtons(mods)
# Tell the gui system about our new mouse watcher.
self.aspect2d.node().setMouseWatcher(self.mouseWatcherNode)