From 36e47efb6f01fcc7ac97970b91864e1e81dd33ab Mon Sep 17 00:00:00 2001 From: David Rose Date: Tue, 19 Feb 2002 17:46:43 +0000 Subject: [PATCH] hotkeys are now lowercase --- direct/src/directtools/DirectSession.py | 4 ++-- direct/src/showbase/ShowBase.py | 9 +++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/direct/src/directtools/DirectSession.py b/direct/src/directtools/DirectSession.py index f57cd3f275..acf75bfcc2 100644 --- a/direct/src/directtools/DirectSession.py +++ b/direct/src/directtools/DirectSession.py @@ -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'] diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index 9f85c1a9fd..ea930abb9b 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -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)