Flex :: Adding Keyboard Shortcuts To Application
Sep 3, 2009
I have a flex app with lots of custom components, like custom buttons, comboBoxes etc. I am trying to add keyBoard shortcuts to the flex app. In doing so, I added a key-down listener to the app to listen for ctrl+shift key combination like this:
this.stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
Then I dispatch a custom event that all of my custom components are listening for:
private function reportKeyDown(event:KeyboardEvent):void {
var evtObj:Object = new Object();
evtObj.keyEvent = event;
dispatchEvent(new CustomEvent(CustomEvent.SHORTCUT_KEYS_PRESSED, evtObj, true, false));
}
In my custom button component I have:
this.addEventListener(CustomEvent.SHORTCUT_KEYS_PRESSED, ShortCutKeysHandler, true);
So, if I go ctrl+shift+W then I want one instance of the custom button to get clicked. For some reason, the event never gets triggered and never gets to the ShortCutKeysHandler function.
View 1 Replies
Similar Posts:
Oct 17, 2010
I have an mx:Menubar, which I need to be able to open/expand based on the key pressed. For e.g., if Shift + R is pressed, it needs to open the 'Request' topmenu. Then if Shift + N is pressed, it should load the 'New request' module in the module loader. I've already implemented the MenuBar/module-loading functionality with the mouse, but I haven't been able to implement the keyboard shortcuts. I found a nice sample at [URL].
However, the solution directly performs the action (e.g. Shift + N to load the 'New request' module). The menu does not open/expand when you press the shortcut as though you had hovered your mouse over it (e.g. Shift + R to open/expand the 'Request' topmenu and then Shift + N to load the 'New request' module).
View 1 Replies
Dec 10, 2009
I have a quite large Flex application with a large set of views and I ceratain views I'd like to add shortcuts. And i'm looking for something like:
<mx:Vbox>
<foo:Shortcut keys="ctrl+s" action="{bar();}"/>
</mx:VBox>
Is there any framwork or component already done that does something like this? I guess it should be too difficult to build? When building this I only want the shortcuts to be active when the view is visible. How do I detect this? What base class is best to inherit from when working with non visual components?
View 3 Replies
Feb 1, 2010
My keyboard shortcuts have quit working. I'm not talking custom shortcuts that I have defined. The default Flash shortcuts just don't work anymore.Before anyone asks, yes, I have made sure the "Disable keyboard shortcuts" option is turned off. I'm running Flash CS4 on a Windows XP pro machine.
View 2 Replies
Apr 25, 2009
I would love to backup my Flash CS4 keyboard shortcuts, but I could not find the file anywhere on my harddrive. I searched for every *.WFX file (or at least that was the right file type for older versions of Flash). I even tried to make an advanced search for all files on my PC and sort them by date modified, right after I made some changes in Flashes keyboard shortcuts - hoping that I would find the file, but haven't.
View 2 Replies
Oct 6, 2009
I'm assuming the answer to my question is "no" but figure it's worth asking just in caseI'm mostly an AS3 coder, but I need to work on library assets quite often to set classnames on assets so they can be instantiated through code. This usually involves hunting through the Library for the asset I need, then giving it a new name, clicking the tiny little "info" icon at the bottom of the window to bring up the Properties panel for the library item, and assigning a class name etc.
My problem is bringing up the Properties panel is not as quick and simple as it should be. That "info" icon really is tiny, and right-clicking the item in the library and scrolling through it to get to the "Properties" item is fiddly and error prone.What I really want is a keyboard shortcut. There doesn't seem to be one, and I can't assign one in the otherwise excellent Keyboard Shortcuts... menu item since Library commands are not listed there. It is not even a menu item so I can't even trigger it with applescript.
View 2 Replies
Jan 16, 2012
I wirte my own jsfl commands and put them into "Commands/myScript" folder, and Flash-IDE can recognize/run them without any problem.But when I assigned key shortcut to my commands in "Commands/myScript" folder, and restart Flash-IDE, my shortcuts will NOT WORKING.To correct this problem, I have to open Keyboard Shortcuts Setting window, switch to my own commands, not doing any change and click OK, then my shortcuts work again now(I have to do these EVERY TIME after Flash-IDE started).
View 1 Replies
Nov 4, 2008
For years now I have had to restart Flash about once a week because my keyboard shortcuts just stop working. This has happened to me since about Flash 5!
View 1 Replies
Oct 11, 2010
I have a photo gallery that can be navigated via arrow keys and various keyboard shortcuts. However on the same SWF is also a contact form...now whenever you fill it in and use the 'F' key it tries to put the flash file into Full ScreenHow can I disable all shortcuts when in frame 30 of my SWF (the contact form) and then re-enable them when moving away from that frame.Using Flash CS5 with SlideshowPro. Have looked over the web but can't find very much on this issue at all (surprising?)
View 1 Replies
Aug 13, 2009
I always used this shortcuts for copy/pasteCut - Shift+DelCopy - Control+InsertPaste - Shift+InsertSo this shortcuts doesnt work in Flash IDE. I've addet this shortcuts in Edit -> Keyboard ShortcutsBUT IT STILL DOESNT WORK !!!I dont wanna use Control+X Control+C Control+Vwhy shortcuts customizing doesnt work ?
View 28 Replies
Jul 19, 2011
You can easily export Flash keyboard shortcuts in a HTML format but how on Earth do you import them? There simply is no visible way to do it in the keyboard shortcut panel? How do I go about doing this? (I'm using CS5.5)
View 0 Replies
Nov 7, 2007
Accessibility is driving me up the WALL! I have a system that has menu pop-ups and because of accessibility when the user selects OK it does what ever action the pop-up does and when the user presses ESC it leaves the menu. My issue is this all works fine when testing it in the swf file and selecting the 'disable keyboard shortcuts' BUT when I embedded it into HTML is loses this function and the short cuts stop working and at points activate html stuff. Is there a line of code or something that I can place in the .swf or .html that will disable the keyboard shortcuts?
View 2 Replies
Oct 27, 2009
CS3 -> CS4 transition newb here who's getting increasingly frustrated with the new motion tweens; however, for this project, I'm working in a 3D space and require using them, so I'm dealing with this bit by painful bit. I found the tip about Split Motion, but first question: how do you apply Split Motion across several layers at the same time? I have six different tweens, and in CS3, I used to be able to shift-click or click-drag across frames and apply a command to all of them (for example, hit F5 to add frames), but Split Motion is requiring me to right-click on each and every layer. This is really laborious, and I worrySimilarly, I tend to add custom keyboard shortcuts to each of my Flash versions for commands I use frequently and don't want to right-click a menu for (such as "add motion tween") - however, I can't seem to find where to create a custom shortcut for either that, or Split Motion.
View 1 Replies
Jan 30, 2009
I'm trying to capture keyboard events with the following code. I'm testing in an external popup flash player in FlashDevelop and it ain't tracing anything. I reckon it might be something to do with keyboard shortcuts in the flash player.
But I can't find where to disable them?
ActionScript Code:
package {
import flash.display.Sprite;
import flash.events.KeyboardEvent;
[Code]....
View 9 Replies
Oct 17, 2008
I have a Flash movie which fills the whole browser window. This means that always the key events are catched ("stolen") by the Flash movie only, when using Firefox. IE7 seems to be working as I want.
I want for example ctrl+w (close window), ctrl+n (new window), ctrl+t (new tab) to work in Firefox while the focus is on my Flash movie. How to accomplish this?
View 7 Replies
Aug 17, 2009
I'm working on an application and I am building a "Keyboard" component for it. There are 30 keys on the keyboard and it doesnt seem to make practical sense to create an event handler for each button. When the button is clicked, its label should be sent out to a function which adds it to a textinput field. Should I just create a "click=SomeFunction(Button.label)" for each button or is there a better/faster/less processor intensive way to do it?
View 1 Replies
Jan 5, 2011
I have an enterprise Flex web application, served up over https, that runs fine on Flash player 10.0 and beyond on a desktop computer/browser.
However, when I run it from my HTC Incredible with Android 2.2 the app loads fine, but there is no on-screen keyboard and so I cannot log in. I can see the blinking cursor inside the username and password text fields. I can switch between them. I can even hit the login button and see an authentication error!
View 6 Replies
Feb 1, 2010
One of our application is implemented in flex and adobe air. We want to have the user press combination of keys, say 'ABC', and have the keyboard return a different character, 'FOG', to whatever app is in focus. This should work even if app has no focus.
Will it possible in Adobe Air/Flex? If yes, provide me some examples?
View 1 Replies
Nov 26, 2010
My Flex application is heavily keyboard-oriented. It uses 100% of the browser window and I'd like the user to be able to start using it immediately - as soon as it loads. However, it seems that the application is only first "activated" (i.e. the activate event fires) when the mouse clicks somewhere inside it, which is very inconvenient for my keyboard-heavy app.
Can I force an activation of my app at some point during/after it loads? I hope I don't have to display some silly "click inside to activate" overlay every time the page loads..
In certain browsers ([cough] Chrome [/cough]) the focus is lost whenever the user switches away from the browser (or even touches the address bar) and is not regained when switching back. So the solution has to take in consideration not just the first focus when the page loads but also "re-focusing".
View 2 Replies
Sep 17, 2010
I have an J2EE Enterprise Application Project in which I would like to add a few Flex screens. How do I go about adding Flex capabilities.
I have build Flex/J2EE applications from scratch but can't think of the best way to do this.
I am currently using Flex Builder Plugin for IBM Rational Application Developer 7.5.
View 1 Replies
Jan 13, 2010
I'm trying to make a quiz in flex and am loading data from an xml file. For each question I want to create a radiobuttongroup so I can associate radio buttons to it. How can I accomplish that with actionscript? I can see that addChild method works for DisplayObjects and I presume that radiobuttongroup is not one because I'm receiving errors. How can I dynamically add radiobuttongroup with actionscript in flex application?
View 2 Replies
Dec 7, 2011
How could I assign a keyboard shortcut to the "edit multiple frames" button, and setting onion skin options?I don't see these options anywhere in Flash's standard top menus.These are the buttons I'm talking about:Also, how about a keyboard shortcut for setting brush sizes?The only way I can figure out how to set this is from the tools panel dropdown.
View 2 Replies
Feb 4, 2011
I have an AIR app that gets bundled with XML files that the app needs. These get put into the APP Storage Directory, of course. Works great. But when I install a new version ( which includes new XML files) , the new files don't get added or overwrite the ones from the previous version. It seems that if that directory is there from a previous install, the installer will ignore the part where it moves included files.
View 1 Replies
Jul 17, 2009
I tried catching the command key shortcuts using the keyDown event and checking for KeyboardEvent.ctrlKey, but the browser(Safari) seemed to have intercepted all those key events because the shortcuts I am trying to use coincides with the safari ones.
View 1 Replies
Jul 26, 2011
How do? Edit the field with numeric keypad, not a full keyboard my code: <s:TextInput text="{TransactionObject.cartao}" id="item" restrict="0123456789" /> app for Android and playbook
View 2 Replies
Sep 7, 2011
can we no longer use the ESCAPE key on the keyboard during adding AS sCripts on AS3? e.g.? ESC then S then T gives the
View 4 Replies
Jun 16, 2011
Is it Possible To Capture KeyBoard Or mouse events When Clicked on desktop or anywhere outside the application screen using AIR or JAVA
View 1 Replies
Aug 18, 2010
I was wondering, is it possible for a shockwave application to detect if a keystroke came for the keyboard, or from another application simulating a keystroke?
View 1 Replies
Nov 28, 2011
Is it possible to say, make an application that passes its keyboard events to other programs?Like if I typed something into a text field in flash it would also "type" it into chrome, microsoft word, notepad++, ext.
View 1 Replies
Oct 1, 2011
I tried something I did on a soundBoard I made with an external folder, but then I thought that folder will never be added on the phone, so how am I going to do this?
View 7 Replies