Hotkeys keys in place to focus major windows; working on keys to share desktop, webcam, microphone

This commit is contained in:
jtrobinson 2012-12-18 22:49:02 +00:00
parent f000b81d22
commit 46b014337a
15 changed files with 146 additions and 40 deletions

View File

@ -282,18 +282,37 @@ bbb.shortcuthelp.dropdown.presentation = Presentation shortcuts
bbb.shortcuthelp.dropdown.chat = Chat shortcuts
bbb.shortcuthelp.dropdown.audio = Audio shortcuts
bbb.shortcutkey.flash.exit = control+shift+81
bbb.shortcutkey.flash.exit = 81
bbb.shortcutkey.flash.exit.function = Focus out of the Flash window
bbb.shortcutkey.listeners.muteme = control+shift+77
bbb.shortcutkey.listeners.muteme = 77
bbb.shortcutkey.listeners.muteme.function = Mute and Unmute your microphone
bbb.shortcutkey.chat.chatinput = control+shift+67
bbb.shortcutkey.chat.chatinput = 73
bbb.shortcutkey.chat.chatinput.function = Focus the chat input box
bbb.shortcutkey.chat.chattabs = control+shift+53
bbb.shortcutkey.chat.chattabs = 53
bbb.shortcutkey.chat.chattabs.function = Focus the chat tabs
bbb.shortcutkey.present.focusslide = control+shift+83
bbb.shortcutkey.present.focusslide = 83
bbb.shortcutkey.present.focusslide.function = Focus the presentation slide
bbb.shortcutkey.whiteboard.undo = control+90
bbb.shortcutkey.whiteboard.undo = 90
bbb.shortcutkey.whiteboard.undo.function = Undo last whiteboard mark
bbb.shortcutkey.focus.viewers = 85
bbb.shortcutkey.focus.viewers.function = Move focus to the Viewers window.
bbb.shortcutkey.focus.listeners = 76
bbb.shortcutkey.focus.listeners.function = Move focus to the Listeners window.
bbb.shortcutkey.focus.video = 86
bbb.shortcutkey.focus.video.function = Move focus to the Video dock.
bbb.shortcutkey.focus.presentation = 80
bbb.shortcutkey.focus.presentation.function = Move focus to the Presentation window.
bbb.shortcutkey.focus.chat = 67
bbb.shortcutkey.focus.chat.function = Move focus to the Chat window.
bbb.shortcutkey.share.desktop = 68
bbb.shortcutkey.share.desktop.function = Open desktop sharing window.
bbb.shortcutkey.share.microphone = 79
bbb.shortcutkey.share.microphone.function = Open microphone settings window.
bbb.shortcutkey.share.webcam = 66
bbb.shortcutkey.share.webcam.function = Open webcam sharing window.
bbb.shortcutkey.chat.chatbox.advance = shift+alt+32
bbb.shortcutkey.chat.chatbox.advance.function = Advance one message
bbb.shortcutkey.chat.chatbox.goback = control+32

View File

@ -110,18 +110,25 @@
private var keyCombos:Object;
private function loadKeyCombos(modifier:String):void {
keyCombos = new Object(); // always start with a fresh array
keyCombos = new Object(); // always start with a fresh array
keyCombos[(ResourceUtil.getInstance().getString('bbb.shortcutkey.flash.exit') as String)] = ShortcutEvent.FOCUS_AWAY_EVENT;
keyCombos[(ResourceUtil.getInstance().getString('bbb.shortcutkey.listeners.muteme') as String)] = ShortcutEvent.MUTE_ME_EVENT;
keyCombos[(ResourceUtil.getInstance().getString('bbb.shortcutkey.chat.chatinput') as String)] = ShortcutEvent.FOCUS_CHAT_INPUT;
keyCombos[(ResourceUtil.getInstance().getString('bbb.shortcutkey.chat.chattabs') as String)] = ShortcutEvent.FOCUS_CHAT_TABS;
//keyCombos[(ResourceUtil.getInstance().getString('bbb.shortcutkey.present.focusslide') as String)] = ShortcutEvent.FOCUS_SLIDE;
keyCombos[modifier+"83"] = ShortcutEvent.FOCUS_SLIDE;
keyCombos[(ResourceUtil.getInstance().getString('bbb.shortcutkey.whiteboard.undo') as String)] = ShortcutEvent.UNDO_WHITEBOARD;
}
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.flash.exit') as String)] = ShortcutEvent.FOCUS_AWAY_EVENT;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.listeners.muteme') as String)] = ShortcutEvent.MUTE_ME_EVENT;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.chat.chatinput') as String)] = ShortcutEvent.FOCUS_CHAT_INPUT;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.chat.chattabs') as String)] = ShortcutEvent.FOCUS_CHAT_TABS; // Deprecated; doesn't actually do anything
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.present.focusslide') as String)] = ShortcutEvent.FOCUS_SLIDE;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.whiteboard.undo') as String)] = ShortcutEvent.UNDO_WHITEBOARD;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.viewers') as String)] = ShortcutEvent.FOCUS_VIEWERS_WINDOW;
keyCombos[modifier+(ResourceUtil.getInstance().getString('bbb.shortcutkey.focus.listeners') as String)] = ShortcutEvent.FOCUS_LISTENERS_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[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;
}
private function hotkeyCapture():void{
LogUtil.debug("Entering hotkeyCapture");
@ -138,12 +145,9 @@
var keyPress:String = (e.ctrlKey ? "control+" : "") + (e.shiftKey ? "shift+" : "") +
(e.altKey ? "alt+" : "") + e.keyCode;
LogUtil.debug("WATERFALL: keyPress is " + keyPress);
LogUtil.debug("WATERFALL: Your modifier + non-mod keys is " + modifier + e.keyCode);
//var browserName:String = ExternalInterface.call("determineBrowser");
//LogUtil.debug("WATERFALL: browserName is " + browserName + " and your modifier is " + modifier);
//if (keyCombos == null) loadKeyCombos();
//LogUtil.debug("WATERFALL: keyPress is " + keyPress);
//LogUtil.debug("WATERFALL: Your modifier + non-mod keys is " + modifier + e.keyCode);
if (keyCombos[keyPress]) {
globalDispatcher.dispatchEvent(new ShortcutEvent(keyCombos[keyPress]));
}

View File

@ -38,6 +38,7 @@ package org.bigbluebutton.common.events
*/
public var button:IBbbToolbarComponent;
public var location:String = TOP_TOOLBAR;
public var module:String;
//public var tabIndex:int;
public function ToolbarButtonEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false)

View File

@ -35,6 +35,17 @@ package org.bigbluebutton.main.events {
public static const GOREAD_MESSAGE:String = 'GOREAD_MESSAGE';
public static const OPEN_SHORTCUT_WIN:String = 'OPEN_SHORTCUT_WIN';
public static const FOCUS_VIEWERS_WINDOW:String = 'FOCUS_VIEWERS_WINDOW';
public static const FOCUS_LISTENERS_WINDOW:String = 'FOCUS_LISTENERS_WINDOW';
public static const FOCUS_VIDEO_WINDOW:String = 'FOCUS_VIDEO_WINDOW';
public static const FOCUS_PRESENTATION_WINDOW:String = 'FOCUS_PRESENTATION_WINDOW';
public static const FOCUS_CHAT_WINDOW:String = 'FOCUS_CHAT_WINDOW';
public static const SHARE_DESKTOP:String = 'SHARE_DESKTOP';
public static const SHARE_MICROPHONE:String = 'SHARE_MICROPHONE';
public static const SHARE_WEBCAM:String = 'SHARE_WEBCAM';
public var otherUserID:String;
public function ShortcutEvent(type:String, bubbles:Boolean=true, cancelable:Boolean=false) {

View File

@ -32,6 +32,10 @@
<mate:Listener type="{ConfigEvent.CONFIG_EVENT}" method="gotConfigParameters" />
<mate:Listener type="{SettingsEvent.SETTINGS_MODULE_LOADED}" method="showSettingsButton" />
<mate:Listener type="{ShortcutEvent.SHARE_DESKTOP}" method="shareDesktop" />
<mate:Listener type="{ShortcutEvent.SHARE_WEBCAM}" method="shareWebcam" />
<mate:Listener type="{ShortcutEvent.SHARE_MICROPHONE}" method="shareMicrophone" />
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
@ -100,6 +104,18 @@
LogUtil.debug("WATERFALL End of MTB init, baseindex is " + baseIndex);
//*/
}
public function shareDesktop:void{
}
public function shareWebcam:void{
}
public function shareMicrophone:void{
}
public function displayToolbar():void{
toolbarOptions = new LayoutOptions();
@ -153,12 +169,22 @@
// Find out how to import accessibility into custom components; even though the ToolbarButtons are buttons, they don't seem to have a tabIndex
if (event.location == ToolbarButtonEvent.TOP_TOOLBAR) {
/*var localButton:IBbbToolbarComponent;
localButton = event.button;
(localButton as Button).tabIndex = baseIndex + numButtons;
addedBtns.addChild(localButton as UIComponent);*/
var localButton:UIComponent;
if (event.module == "DeskShare"){
localButton.id = "deskshareBtn";
}
else if (event.module == "Microphone"){
localButton.id = "microphoneBtn";
}
else if (event.module == "Webcam"){
localButton.id = "webcamBtn";
}
addedBtns.addChild(event.button as UIComponent);
localButton = event.button as UIComponent;
//(localButton as Button).tabIndex = baseIndex + numButtons;
addedBtns.addChild(localButton);
//addedBtns.addChild(event.button as UIComponent);
numButtons++;
realignButtons();
}

View File

@ -26,7 +26,7 @@
creationComplete="onCreationComplete()"
xmlns:mate="http://mate.asfusion.com/"
title="{ResourceUtil.getInstance().getString('bbb.shortcuthelp.title')}"
initialize="testInit()">
>
<mx:Script>
<![CDATA[
@ -42,7 +42,9 @@
private var chatKeys:ArrayList;
private var audKeys:ArrayList;
private var genResource:Array = ['bbb.shortcutkey.flash.exit'];
private var genResource:Array = ['bbb.shortcutkey.flash.exit', 'bbb.shortcutkey.focus.viewers', 'bbb.shortcutkey.focus.listeners',
'bbb.shortcutkey.focus.video', 'bbb.shortcutkey.focus.presentation', 'bbb.shortcutkey.focus.chat',
'bbb.shortcutkey.share.desktop', 'bbb.shortcutkey.share.microphone', 'bbb.shortcutkey.share.webcam'];
private var presResource:Array = ['bbb.shortcutkey.present.focusslide', 'bbb.shortcutkey.whiteboard.undo'];
private var chatResource:Array = ['bbb.shortcutkey.chat.chatinput', 'bbb.shortcutkey.chat.chattabs', 'bbb.shortcutkey.chat.chatbox.advance',
'bbb.shortcutkey.chat.chatbox.goback', 'bbb.shortcutkey.chat.chatbox.repeat', 'bbb.shortcutkey.chat.chatbox.golatest',
@ -51,12 +53,15 @@
[Bindable]
private var shownKeys:ArrayCollection;
private function testInit():void {
//LogUtil.debug("WATERFALL: Initializing Shortcut window");
private function init():void {
}
private function onCreationComplete():void {
//LogUtil.debug("WATERFALL: Creation Complete - Shortcut window");
//var browser = ExternalInterface.call("determineBrowser");
//var modifier = ExternalInterface.call("determineModifier");
//browserInfo.text = "You are using " + browser + " and your hotkey modifier is " + modifier + ".";
reloadKeys();
ResourceUtil.getInstance().addEventListener(Event.CHANGE, reloadKeys); // Listen for locale changing
}
@ -103,21 +108,27 @@
var keyList:ArrayList = new ArrayList();
//LogUtil.debug("CHAD " + resource.length);
var keyCombo:String;
var modifier:String;
var indx:int = 255;
//LogUtil.debug("CHAD " + resource.length);
for (var i:int = 0; i < resource.length; i++) {
//LogUtil.debug("CHAD inside" + resource.length);
// Find the modifier key(s) for the user's browser
modifier = ExternalInterface.call("determineModifier");
keyCombo = ResourceUtil.getInstance().getString(resource[i]);
indx = keyCombo.lastIndexOf("+") + 1;
var key:int = int(keyCombo.substring(indx));
//indx = keyCombo.lastIndexOf("+") + 1;
var key:int = int(keyCombo);
var convKey:String;
if (key == 32) { //special case
convKey = "Space";
} else {
convKey = String.fromCharCode(key);
}
keyList.addItem({Shortcut:keyCombo.substring(0, indx) + convKey,
keyList.addItem({Shortcut:modifier + convKey,
Function:(ResourceUtil.getInstance().getString(resource[i] + '.function'))});
/*keyList.addItem({Shortcut:keyCombo.substring(0, indx) + convKey,
Function:(ResourceUtil.getInstance().getString(resource[i] + '.function'))});*/
}
//LogUtil.debug("CHAD after " + resource.length);
return keyList;
@ -130,6 +141,8 @@
]]>
</mx:Script>
<!-- Probably need to change this from a Label to something else. -->
<mx:Label id="browserInfo" focusEnabled="true" accessibilityName="Placeholder for Browser Info"/>
<mx:ComboBox id="categories" labelField="Please select an area for which to view shortcut keys: "
editable="false"
change="changeArray()"

View File

@ -33,6 +33,7 @@
<mate:Listener type="{ShortcutEvent.FOCUS_CHAT_TABS}" method="focusChatTabs" />
<mate:Listener type="{ShortcutEvent.FOCUS_CHAT_WINDOW}" method="focusWindow" />
<mx:Script>
<![CDATA[
@ -86,6 +87,10 @@
resourcesChanged(); // update the window controls once they've been created
}
private function focusWindow(e:ShortcutEvent):void{
focusManager.setFocus(titleBarOverlay);
}
private function fullScreenHandler(evt:FullScreenEvent):void {
/* dispState = FlexGlobals.topLevelApplication.stage.displayState + " (fullScreen=" + evt.fullScreen.toString() + ")";
if (evt.fullScreen) {
@ -140,6 +145,8 @@
// windowManager.bringToFront(this);
// focusManager.setFocus(chatView.chatTabs);
}
]]>
</mx:Script>

View File

@ -101,6 +101,7 @@ package org.bigbluebutton.modules.classyaudio.managers
private function enablePushToTalkButton():void{
var e:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD);
e.button = new PushToTalkButton();
event.module="Microphone";
//e.tabIndex = 2;
dispatcher.dispatchEvent(e);
}

View File

@ -51,6 +51,7 @@ package org.bigbluebutton.modules.deskshare.managers
/* Test */ //button.tabIndex=4;
var event:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD);
event.button = button;
event.module="DeskShare";
//event.tabIndex = 0;
globalDispatcher.dispatchEvent(event);
buttonShownOnToolbar = true;

View File

@ -30,6 +30,7 @@
xmlns:mate="http://mate.asfusion.com/"
xmlns:controls="flexlib.controls.*">
<mate:Listener type="{ShortcutEvent.FOCUS_LISTENERS_WINDOW}" method="focusWindow" />
<mate:Listener type="{ListenersEvent.ROOM_MUTE_STATE}" method="roomMuteStateChange" />
<mate:Listener type="{ListenersEvent.REGISTER_LISTENERS}" method="registerListeners" />
<mate:Listener type="{ListenersEvent.SET_LOCAL_MODERATOR_STATUS}" method="{setModerator}" />
@ -103,6 +104,10 @@
LogUtil.debug(listenersList.enabled.toString());
}
private function focusWindow(e:ShortcutEvent):void{
focusManager.setFocus(titleBarOverlay);
}
private function updateShowPushToTalkBtn(show:Boolean):void {
showPushToTalkBtn = UserManager.getInstance().getConference().voiceJoined &&
(UserManager.getInstance().getConference().amIModerator() ||

View File

@ -43,6 +43,7 @@
>
<mate:Dispatcher id="globalDispatcher" />
<mate:Listener type="{ShortcutEvent.FOCUS_PRESENTATION_WINDOW}" method="focusWindow" />
<mate:Listener type="{MadePresenterEvent.SWITCH_TO_PRESENTER_MODE}" method="becomePresenter" />
<mate:Listener type="{MadePresenterEvent.SWITCH_TO_VIEWER_MODE}" method="becomeViewer" />
<mate:Listener type="{PresentationEvent.PRESENTATION_LOADED}" method="handlePresentationLoadedEvent" />
@ -72,6 +73,7 @@
import mx.managers.PopUpManager;
import mx.rpc.events.*;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.common.IBbbCanvas;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.LogUtil;
@ -168,6 +170,10 @@
LogUtil.debug("WATERFALL Presentation slideView.slideLoader.tabIndex " + slideView.slideLoader.tabIndex);
}
private function focusWindow(e:ShortcutEvent):void{
focusManager.setFocus(titleBarOverlay);
}
private function maximizeHandler():void {
// LogUtil.debug("Max handler");
// When the window is maximized, we want to resize the slide maintaining the aspect ratio.

View File

@ -102,6 +102,7 @@ package org.bigbluebutton.modules.videoconf.maps
button.isPresenter = !options.presenterShareOnly;
var event:ToolbarButtonEvent = new ToolbarButtonEvent(ToolbarButtonEvent.ADD);
event.button = button;
event.module="Webcam";
_dispatcher.dispatchEvent(event);
}
}

View File

@ -403,8 +403,7 @@
<mx:ControlBar id="videoOptionsBar" visible="true">
<mx:Button id="btnStartPublish"
toolTip="{ResourceUtil.getInstance().getString('bbb.publishVideo.startPublishBtn.toolTip')}"
icon="{camIcon}"
toolTip="{ResourceUtil.getInstance().getString('bbb.publishVideo.startPublishBtn.toolTip')}"
click="startPublishing()"
enabled="false"
tabIndex="{baseIndex+4}"

View File

@ -32,10 +32,12 @@ $Id: $
verticalAlign="middle"
resize="onChildAdd()">
<mate:Listener type="{ShortcutEvent.FOCUS_VIDEO_WINDOW}" method="focusWindow" />
<mx:Script>
<![CDATA[
import com.asfusion.mate.events.Dispatcher;
import mx.events.ChildExistenceChangedEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.common.LogUtil;
import org.bigbluebutton.common.events.CloseWindowEvent;
import org.bigbluebutton.common.events.DragWindowEvent;
@ -96,9 +98,13 @@ $Id: $
if (options.maximize) this.maximize();
var gDispatcher:Dispatcher = new Dispatcher();
var evt:ConnectAppEvent = new ConnectAppEvent(ConnectAppEvent.CONNECT_VIDEO_APP);
gDispatcher.dispatchEvent(evt);
var gDispatcher:Dispatcher = new Dispatcher();
var evt:ConnectAppEvent = new ConnectAppEvent(ConnectAppEvent.CONNECT_VIDEO_APP);
gDispatcher.dispatchEvent(evt);
}
private function focusWindow(e:ShortcutEvent):void{
focusManager.setFocus(titleBarOverlay);
}
/**

View File

@ -29,6 +29,7 @@
creationComplete="onCreationComplete()"
showCloseButton="false">
<mate:Listener type="{ShortcutEvent.FOCUS_VIEWERS_WINDOW}" method="focusWindow" />
<mate:Listener type="{ConferenceCreatedEvent.CONFERENCE_CREATED_EVENT}" method="conferenceStarted" />
<mate:Listener type="{LocaleChangeEvent.LOCALE_CHANGED}" method="localeChanged" />
@ -42,6 +43,7 @@
import mx.controls.listClasses.IListItemRenderer;
import mx.events.DataGridEvent;
import mx.events.ListEvent;
import org.bigbluebutton.main.events.ShortcutEvent;
import org.bigbluebutton.common.Images;
import org.bigbluebutton.common.Role;
import org.bigbluebutton.common.events.LocaleChangeEvent;
@ -98,6 +100,10 @@
closeBtn.tabIndex = baseIndex+3;
}
private function focusWindow(e:ShortcutEvent):void{
focusManager.setFocus(titleBarOverlay);
}
private function updateNumberOfViewers(numViewers:int):void {
if (numViewers > 4)