diff --git a/bigbluebutton-client/locale/en_US/bbbResources.properties b/bigbluebutton-client/locale/en_US/bbbResources.properties index 8c0609a0569c52d8fec3ada2a5138d539af43f99..4b0af8ff1ca2a1fb249700fb15bc28d1c8e25825 100755 --- a/bigbluebutton-client/locale/en_US/bbbResources.properties +++ b/bigbluebutton-client/locale/en_US/bbbResources.properties @@ -332,7 +332,7 @@ bbb.shortcutkey.share.webcam = 66 bbb.shortcutkey.share.webcam.function = Open webcam sharing window bbb.shortcutkey.shortcutWindow = 72 -bbb.shortcutkey.shortcutWindow.function = Open shortcut help window +bbb.shortcutkey.shortcutWindow.function = Open/focus to shortcut help window bbb.shortcutkey.logout = 76 bbb.shortcutkey.logout.function = Log out of this meeting bbb.shortcutkey.raiseHand = 82 diff --git a/bigbluebutton-client/resources/prod/lib/bbb_blinker.js b/bigbluebutton-client/resources/prod/lib/bbb_blinker.js index d0cd7e66c511ab1f8a1c3d8ad92a4739033fe71c..029ec286e90c9f617fbc5577f57931f441ad2c14 100755 --- a/bigbluebutton-client/resources/prod/lib/bbb_blinker.js +++ b/bigbluebutton-client/resources/prod/lib/bbb_blinker.js @@ -56,13 +56,35 @@ function determineModifier() modifier = "control+"; } else if (browser == "Microsoft Internet Explorer"){ - modifier = "shift+alt+"; + modifier = "control+shift+"; } - /*else if (browser == "Safari"){ - modifier = "control+"; - }*/ + //else if (browser == "Safari"){ + // modifier = "control+shift+"; + //} + else{ + modifier = "control+shift+"; + } + return modifier; +} + +function determineGlobalModifier() +{ + var browser = determineBrowser(); + var modifier; + if (browser == "Firefox"){ + modifier = "control+shift+"; + } + else if (browser == "Chrome"){ + modifier = "control+shift+"; + } + else if (browser == "Microsoft Internet Explorer"){ + modifier = "control+alt+"; + } + //else if (browser == "Safari"){ + // modifier = "control+alt"; + //} else{ - modifier = "shift+alt+"; + modifier = "control+alt+"; } return modifier; } diff --git a/bigbluebutton-client/src/BigBlueButton.mxml b/bigbluebutton-client/src/BigBlueButton.mxml index 9b0d490d16353c46c74a553b2fe5ab0b48b34407..f2133bf59fa2b3e78593aebb7fc0a36a61639819 100755 --- a/bigbluebutton-client/src/BigBlueButton.mxml +++ b/bigbluebutton-client/src/BigBlueButton.mxml @@ -49,7 +49,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. import org.bigbluebutton.util.i18n.ResourceUtil; private var langResources:ResourceUtil = null; //ResourceUtil.getInstance(); - private var modifier:String; + private var globalModifier:String; /** * Thse two lines are workaround for this. (ralam - Nov 8, 2008) * http://gregjessup.com/flex-3-advanceddatagrid-cannot-convert-mxmanagersdragmanagerimpl-to-mxmanagersidragmanager/ @@ -67,7 +67,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. setupAPI(); EventBroadcaster.getInstance().addEventListener("configLoadedEvent", configLoadedEventHandler); BBB.initConfigManager(); - modifier = ExternalInterface.call("determineModifier"); + globalModifier = ExternalInterface.call("determineGlobalModifier"); } private function configLoadedEventHandler(e:Event):void { @@ -104,31 +104,31 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. */ private function localeChanged(e:Event):void{ - loadKeyCombos(modifier); + loadKeyCombos(globalModifier); } private var keyCombos:Object; - private function loadKeyCombos(modifier:String):void { + private function loadKeyCombos(globalModifier:String):void { keyCombos = new Object(); // always start with a fresh array - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.flash.exit') as String)] = ShortcutEvent.FOCUS_AWAY_EVENT; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.users.muteme') as String)] = ShortcutEvent.MUTE_ME_EVENT; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.chat.chatinput') as String)] = ShortcutEvent.FOCUS_CHAT_INPUT; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.flash.exit') as String)] = ShortcutEvent.FOCUS_AWAY_EVENT; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.users.muteme') as String)] = ShortcutEvent.MUTE_ME_EVENT; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.chat.chatinput') as String)] = ShortcutEvent.FOCUS_CHAT_INPUT; // General hotKeys (usable from anywhere in the application) - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.users') as String)] = ShortcutEvent.FOCUS_USERS_WINDOW; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.video') as String)] = ShortcutEvent.FOCUS_VIDEO_WINDOW; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.presentation') as String)] = ShortcutEvent.FOCUS_PRESENTATION_WINDOW; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.chat') as String)] = ShortcutEvent.FOCUS_CHAT_WINDOW; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.users') as String)] = ShortcutEvent.FOCUS_USERS_WINDOW; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.video') as String)] = ShortcutEvent.FOCUS_VIDEO_WINDOW; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.presentation') as String)] = ShortcutEvent.FOCUS_PRESENTATION_WINDOW; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.chat') as String)] = ShortcutEvent.FOCUS_CHAT_WINDOW; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.desktop') as String)] = ShortcutEvent.SHARE_DESKTOP; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.webcam') as String)] = ShortcutEvent.SHARE_WEBCAM; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.microphone') as String)] = ShortcutEvent.SHARE_MICROPHONE; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.desktop') as String)] = ShortcutEvent.SHARE_DESKTOP; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.webcam') as String)] = ShortcutEvent.SHARE_WEBCAM; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.share.microphone') as String)] = ShortcutEvent.SHARE_MICROPHONE; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.shortcutWindow') as String)] = ShortcutEvent.REMOTE_OPEN_SHORTCUT_WIN; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.logout') as String)] = ShortcutEvent.LOGOUT; - keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.raiseHand') as String)] = ShortcutEvent.RAISE_HAND; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.shortcutWindow') as String)] = ShortcutEvent.REMOTE_OPEN_SHORTCUT_WIN; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.logout') as String)] = ShortcutEvent.LOGOUT; + keyCombos[globalModifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.raiseHand') as String)] = ShortcutEvent.RAISE_HAND; } public function hotkeyCapture():void{ @@ -140,7 +140,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. // Handle general-access hotkeys, regardless of what window the user is focused in private function handleKeyDown(e:KeyboardEvent) :void { - if (keyCombos == null) loadKeyCombos(modifier); + if (keyCombos == null) loadKeyCombos(globalModifier); var keyPress:String = (e.ctrlKey ? "control+" : "") + (e.shiftKey ? "shift+" : "") + (e.altKey ? "alt+" : "") + e.keyCode; diff --git a/bigbluebutton-client/src/org/bigbluebutton/main/views/ShortcutHelpWindow.mxml b/bigbluebutton-client/src/org/bigbluebutton/main/views/ShortcutHelpWindow.mxml index 64a5aff4626e30bc13f7e1c0816f602961a77874..8c0b2685e391c039228b3236999ae5e738a995e0 100755 --- a/bigbluebutton-client/src/org/bigbluebutton/main/views/ShortcutHelpWindow.mxml +++ b/bigbluebutton-client/src/org/bigbluebutton/main/views/ShortcutHelpWindow.mxml @@ -23,6 +23,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. <MDIWindow xmlns="flexlib.mdi.containers.*" xmlns:mx="http://www.adobe.com/2006/mxml" showCloseButton="true" + initialize="init()" creationComplete="onCreationComplete()" xmlns:mate="http://mate.asfusion.com/" title="{ResourceUtil.getInstance().getString('bbb.shortcuthelp.title')}" > @@ -33,6 +34,8 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. <![CDATA[ import flash.events.Event; + import flexlib.controls.textClasses.StringBoundaries; + import mx.collections.ArrayCollection; import mx.collections.ArrayList; @@ -46,24 +49,23 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. private var chatKeys:ArrayList; private var userKeys:ArrayList; - private var genResource:Array = ['bbb.shortcutkey.general.minimize', 'bbb.shortcutkey.general.maximize', - 'bbb.shortcutkey.flash.exit', 'bbb.shortcutkey.focus.users', 'bbb.shortcutkey.focus.video', - 'bbb.shortcutkey.focus.presentation', 'bbb.shortcutkey.focus.chat', 'bbb.shortcutkey.share.desktop', + private var genResource:Array = ['bbb.shortcutkey.general.minimize', 'bbb.shortcutkey.general.maximize', 'bbb.shortcutkey.flash.exit', + 'bbb.shortcutkey.focus.users', 'bbb.shortcutkey.focus.video', 'bbb.shortcutkey.focus.presentation', + 'bbb.shortcutkey.focus.chat', 'bbb.shortcutkey.chat.chatinput', 'bbb.shortcutkey.share.desktop', 'bbb.shortcutkey.share.microphone', 'bbb.shortcutkey.share.webcam', 'bbb.shortcutkey.shortcutWindow', 'bbb.shortcutkey.logout', 'bbb.shortcutkey.raiseHand', 'bbb.shortcutkey.users.muteme']; - private var presResource:Array = ['bbb.shortcutkey.focus.presentation', 'bbb.shortcutkey.present.focusslide', 'bbb.shortcutkey.whiteboard.undo', - 'bbb.shortcutkey.present.upload', 'bbb.shortcutkey.present.previous', 'bbb.shortcutkey.present.select', - 'bbb.shortcutkey.present.next', 'bbb.shortcutkey.present.fitWidth', 'bbb.shortcutkey.present.fitPage']; + private var presResource:Array = ['bbb.shortcutkey.present.focusslide', 'bbb.shortcutkey.whiteboard.undo', 'bbb.shortcutkey.present.upload', + 'bbb.shortcutkey.present.previous', 'bbb.shortcutkey.present.select', 'bbb.shortcutkey.present.next', + 'bbb.shortcutkey.present.fitWidth', 'bbb.shortcutkey.present.fitPage']; - private var chatResource:Array = ['bbb.shortcutkey.focus.chat', 'bbb.shortcutkey.chat.chatinput', 'bbb.shortcutkey.chat.focusTabs', - 'bbb.shortcutkey.chat.focusBox', 'bbb.shortcutkey.chat.changeColour', 'bbb.shortcutkey.chat.sendMessage', - 'bbb.shortcutkey.chat.explanation', - 'bbb.shortcutkey.chat.chatbox.gofirst', 'bbb.shortcutkey.chat.chatbox.goback', 'bbb.shortcutkey.chat.chatbox.repeat', - 'bbb.shortcutkey.chat.chatbox.advance', 'bbb.shortcutkey.chat.chatbox.golatest', 'bbb.shortcutkey.chat.chatbox.goread']; + private var chatResource:Array = ['bbb.shortcutkey.chat.focusTabs', 'bbb.shortcutkey.chat.focusBox', 'bbb.shortcutkey.chat.changeColour', + 'bbb.shortcutkey.chat.sendMessage', 'bbb.shortcutkey.chat.explanation', 'bbb.shortcutkey.chat.chatbox.gofirst', + 'bbb.shortcutkey.chat.chatbox.goback', 'bbb.shortcutkey.chat.chatbox.repeat', 'bbb.shortcutkey.chat.chatbox.advance', + 'bbb.shortcutkey.chat.chatbox.golatest', 'bbb.shortcutkey.chat.chatbox.goread']; - private var userResource:Array = ['bbb.shortcutkey.focus.users', 'bbb.shortcutkey.users.focusUsers', 'bbb.shortcutkey.users.makePresenter', 'bbb.shortcutkey.users.mute', - 'bbb.shortcutkey.users.kick', 'bbb.shortcutkey.users.muteall']; + private var userResource:Array = ['bbb.shortcutkey.users.focusUsers', 'bbb.shortcutkey.users.makePresenter', 'bbb.shortcutkey.users.mute', + 'bbb.shortcutkey.users.kick', 'bbb.shortcutkey.users.muteall']; [Bindable] private var shownKeys:ArrayCollection; @@ -71,8 +73,12 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. [Bindable] private var baseIndex:int = 100; + private var modifier:String; + private var globalModifier:String; + private function init():void { - + modifier = ExternalInterface.call("determineModifier"); + globalModifier = ExternalInterface.call("determineGlobalModifier"); } private function onCreationComplete():void { @@ -86,7 +92,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. } private function reloadKeys():void { - genKeys = loadKeys(genResource); + genKeys = loadKeys(genResource, true); presKeys = loadKeys(presResource); chatKeys = loadKeys(chatResource); userKeys = loadKeys(userResource); @@ -112,14 +118,17 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. } } - private function loadKeys(resource:Array):ArrayList { + private function loadKeys(resource:Array, global:Boolean=false):ArrayList { var keyList:ArrayList = new ArrayList(); var keyCombo:String; - var modifier:String; + var mod:String; + + if (global) + mod = globalModifier; + else + mod = modifier; + for (var i:int = 0; i < resource.length; i++) { - - // Find the modifier key(s) for the user's browser - modifier = ExternalInterface.call("determineModifier"); keyCombo = ResourceUtil.getInstance().getString(resource[i]); var key:int = int(keyCombo); var convKey:String; @@ -143,7 +152,7 @@ with BigBlueButton; if not, see <http://www.gnu.org/licenses/>. if (keyCombo == "----"){ keyList.addItem({shortcut:(ResourceUtil.getInstance().getString(resource[i] + '.function')), func:""}); } else{ - keyList.addItem({shortcut:modifier + convKey, func:(ResourceUtil.getInstance().getString(resource[i] + '.function'))}); + keyList.addItem({shortcut:mod + convKey, func:(ResourceUtil.getInstance().getString(resource[i] + '.function'))}); } } return keyList;