Strange problem with the keyboard event listener

I have a full screen touch app. To close the application, I set an event listener on keyboard for the key "0". I don't want the press user due to some restrictions Alt + F4 key combination. Problems begin when the application loses focus. Here's the code;

protected function onComplete(event:FlexEvent):void
{

this.setFocus ();
this.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys, true, 0, true);

}

private void trapKeys(e:KeyboardEvent):void {}

If (e.keyCode == 96) {}
This.Close ();
}

Else if (e.keyCode == 48) {}
This.Close ();
}

}

When the user change the screen to a different with Alt + TAB application, or any other combination of keys flex app loses focus and does not work when he turns back to my app "0". How can I solve this problem?

Thanks in advance.

Hi, Ahmed.

I have absolutely no problem with the solution you are trying to set up - you use mode full-screen interactive mode of keyboard?

Please consider:

on full add keyboard listener

protected function applicationCompleteHandler(event:FlexEvent):void

{

this.stage.addEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

};

//

protected function applicationActivateHandler(event:AIREvent):void

{

If (this.stage)

{

switch the State to display full-screen when activated

If (this.stage.displayState! = StageDisplayState.FULL_SCREEN_INTERACTIVE)

{

this.stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;

};

};

};

//

private var exitHandled:Boolean = false;

on NUMBER_0 | NUMPAD_0 exit-close

protected function trapKeys(event:KeyboardEvent):void

{

If ((event.keyCode is Keyboard.NUMBER_0

|| event.keyCode is Keyboard.NUMPAD_0)

(& this.exitHandled == false)

{

exitHandled = true;

this.stage.removeEventListener (KeyboardEvent.KEY_DOWN, trapKeys);

This.Close ();

};

}

(Note: applicaton of the events 'applicatonComplete' and "applicationActivate" are routed to over managers)

Kind regards

Peter

Tags: Flex

Similar Questions

  • Strange problem with the keyboard

    Hello.
    I have problem with my keyboard. It works with delays. I don't know how to fix it.

    Hello

    What do you mean by working with delays?
    As far as I know, you can change the keyboard settings in the keyboard properties.
    Also, if you think that it s not a fault or parameters of software problem but hardware malfunction, you can try to contact the service agent.
    But before you contact the ASP you should recover the operating system.

    Good bye

  • S205 - problem with the keyboard (right shift key)

    Hello.

    Google couldn't really help me, so I try my luck here

    Two days ago, I met a rather strange problem with the keyboard of my S205 (running Win7 64 bit). For some reason any the right shift key is no longer works as a shift key, but it has the same function as "Alt Gr" key on the right side. FYI: German keyboard. For example, the @ is on the same key as the Q here and normally I have press the AltGr key to type a @. Now the same thing with the right shift key.

    I tried a couple of things already, none of them helped. I have accidentally changed the layout of the keyboard, checked once again in the Control Panel, everything is OK here. No Fn - keys are activated. I tried to plug in an external USB keyboard - on that one, the shift key works fine. The right shift key is the only key that does not work properly. I even tried the keyboard on the screen so I could see which key was pressed when I pressed the SHIFT key and she showed the "Alt Gr" - button is pressed.

    I am open to any suggestion. Thank you

    In case someone might have the same problem - unfortunately I don't have a solution. He solved somehow itself a few months later. Really strange thing, but the key is working again.

  • Strange problems with the database

    Hello

    I just got my Fuze and am very happy with it; However, I am having a very strange problem with the database. I have a 16 GB sdhc card that I use with the "rocket" and there are about 4 songs on the card that will not play and have no information charge tag. Their tags appear in the tag browser (not the in the track information screen) as just an empty rectangle. Under the track information screen, sizes are listed as ~ 4000 mb. The songs will not play and I can not jump in front of one of these songs once they were loaded.

    At first, I suspected some kind of corruption of tag, so I set out that night to track down the problem. I removed the 16 GB card and reset the player. Then, I loaded one of the corrupt in the internal memory of the player. The track has been scanned and played correctly. Then, I removed the track of the internal memory and it loaded on another SDHC card. Yet once, everything worked correctly, so I knew that the card I was using was a kind of system files or physical problem. I returned the original 16 GB sdhc card in the reader and checked that the file was still unplayable, and then I plugged the "rocket" to my computer. I transferred the unplayable file on my computer and compared (with md5sum) to the original file, thinking that if there was the file system or physical corruption the copy of the map would be damaged. However, the files were equivalent.

    To make things even more interesting, I also have problems with the registration of the kind. I have some files tagged Genres such as 'Classic' and 'Rock '. In the list of the genre, I see this:

    C

    CL

    CLA

    CLAS

    Class

    Classic

    Classic

    Classica

    Classic

    Rock

    So, there is corruption on the kind of 'Classic' but not the kind of "Rock". Each of the substrings of 'Classic' contains only a few titles, with most of the other titles listed where they should be. I checked that the tracks are labeled correctly and in exactly the same way as the other tracks that do not have this problem.

    I am at a total loss about what to do, and I'd really appreciate any advice or suggestions. I use the current firmware, 2.03.31a and the songs in question are in Ogg Vorbis format.

    MM

    Thanks for your replies.

    I managed to find what may be the problem. Tracks that received corrupt tags had the names of total path with more than 256 characters. It seems that the driver internal fat32 the rocket uses vomits all over the place when the path name is too long. Before the "rocket", I got an iPod running rockbox tags with the same directory structure that I have on the "rocket", so I don't think that this restriction on the length of the path name is a limitation or requirement of the fat32 file system. Reduce the path corrected the problem with the files being unreadable.

    However, the problem with foires genres the rest. Looking at the files show that corruption, they all have a little information in tags. Most of the information is contained in the hashes I have files that identify them via musicbrainz. The limit on the total number of characters in the tags of the track includes the "rocket" label is not read or use?

    MM

  • strange problem with the database link

    Hello world

    I have a strange problem with the link of database in Oracle 11 g Express Edition;
    There are two computers: computer-server and the client computer. Tnsnames.ora are the same on both computers IE.

    CT =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
    )
    (CONNECT_DATA = (SERVICE_NAME = XE)
    )
    )

    I created the database link:

    Create database link zdalny
    Connect to < user_id > identified by < password >
    using "CT".

    Customer cannot connect with server when I do not use above the command. But when I change 'use' for using "krzysztof:1521" or by using "krzysztof" or "server IP:1521" - everything is ok.

    Why I ask. Because in all the materials that I read about Oracle command with the help of "CT" should work correct. But there is no. Do you know why?

    Thanks in advance and apologize me for my English.

    Rgds
    Krzysztof

    Here's the tnsnames of your server, but to connect to the oracle server db (any client or to another instance of db oracle), you must install oracle client.
    However, in your condition, you want to connect the DB1 Oracle OracleDB2 using a link db, I'm right? In this case you should always set the entry in the tnsnames.ora
    To verify that you can connect to Oracle DB2 from DB1 Oracle, you can use tnsping in the command line.
    In your case

    c:\tnsping CT
    

    Krzysztof Szymaniak wrote: CT =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = XE)
    )
    )

    Check your tnsnames entry in the machine, you are trying to connect to. And check if the tnsping is successful.
    Sometimes the error message says not everything, which means that you need to troubleshoot yourself and learn from the experience.
    Always in the opposite case, refer to the documentation.

    See you soon.

    Published by: Spongebob December 14, 2011 09:30

  • Strange problem with the formatting of the text

    Hello

    I had a strange problem with the formatting of the text. I created a document in Polish language and the strange thing happens when it divides the word to the next line. For example here on this part of the page, I have a word "umieszczamy", which should be divided "' u - CEF - szcza - my", but my Indesign divides in umi-eszczamy (as shown on the picture). " How can I fix it so it divides the word correctly?

    Concerning

    forum.jpg

    What language is awarded when you select the text? Hyphenation, but also the spelling, is controlled by the dictionary that is assigned to the text.

    If the language is correct, you might have to change the hyphenation in the user dictionary.

  • Problem with the onChange event

    Hello

    I am currently facing a problem with the onChange event when you use a datefield entry type.
    for example
    < cfinput type = "datefield" name = "date_txt" width = "175" mask = onFocus = "date_txt.disabledDays" dd/mm/yyyy"= [0.6]; "tabindex ="1"style =" "text-align: left" onChange = "checkDate (); ">

    And then, when I alert the selected date in checkDate function, I still get the old figure.
    for example
    public function checkDate (): Void {}
    Alert ("Date:" + date_txt.text);
    }

    For example if the date displayed is 05/05/2008 and I select another day (05/02/2008), then when the alert box appears, it still shows 2008-05-05.

    Any idea on how to solve this problem?

    Is this a bug with Flash Forms?

    Thank you and best regards,
    Yogesh Mahadnac

    I suppose that the function onchange occurs before the value of text is actually defined.
    Use the correct value
    Alert ("Date:" + date_txt.selectedDate);

    Ken

  • Satellite A135 - problems with the keyboard

    Hello

    I've got aSatellite A135 - s4527 with windows XP SP3 on it.
    I was looking for the solution go PowerSaver work normally. I upgraded the BIOS to v 1.6 for a 1.7 last.
    Now I have trouble with the keyboard. It is not enough. Also, I do not know how bios rollback :(

    Can someone help me please?
    Thanks in advance

    Hello Mikachi

    Please do not be angry on me, but your ad is nothing other than chaotic.
    Initially I don't understand what you mean with normally get jobs to save energy? Normally?
    How it works on your laptop?
    For problems with tools or utilities do not update the BIOS.

    Back to the keyboard. What kind of difficulties do you have?
    Give us more information please. What exactly happens?

  • Problem with the keyboard and audio on Satellite L40

    Hello world
    I just installed XP SP2 on my Satellite L40 (BTW thanks to all of you who helped me overcome the problems during this operation with your son), but I have a problem with my keyboard. I have a QWERTY keyboard and after I installed xp, he worked as a qwerty, I fixed it, now all my letters are working very well, but I have some problems with certain symbols, such as @,., _, if you understand me.

    Could someone help me?

    I also have problems with my audio, in fact I have no sound at all, in the Panel, he said that there is no audio device found.
    I've seen a few threads which said that I should first install kb888111 and another thing is likely, but I can't find the other. I downloaded the audio driver from the toshiba Web site; Thank you for helping me in this area also.

    Good bye

    I have the same problem with the sound... I found hotfix kb888111 and I instaled this one... but when I tried to start installing driver sound a window popup say thet there is an error and cannot continue with the installation driver...
    I found hotfix kb888111 in this file that i have downloaded from the toshiba site: english\sound driver\mshdqfe\win2k_xp\us\kb888111xps2...
    I don't know what to do... Someone else knows...

  • Problem with the entire event looks like a bug

    Hello

    I got a requirement like this, there are two text fields Textfield1 and Textfield2 to say, and Textfield1 is full it should automatically go to textfield2 and fill the characters typed on the keyboard. I had this implemented using comprehensive event. If Textfield1 is full change focus to Textfield2.

    Now, I met a very strange question, i.e., the last character I enter Textfield1 won't Textfield2. His only full because is triggered to the key of the last character.

    I tried other alternatives did not work.

    Guys, now I do not understand is that true. Someone had the same problem.

    Thank you for all that you do.

    Yes, I used this script

    xfa.host.setFocus ("TextField2");   in my complete case. However, I could solve the problem by using newText and limiting the length to 50.

    Now I got a different question, that is, it does not work if I enter all uppercase the TextField1.

    Reason for the number of characters is different for upper and lower case. Don't know how to handle this.

    In addition, I expect to complete event can be a solution in this case, however if I use full event and you change the focus to new textfield the last key shot strays.

    Any help on this would be much appreciated...

  • Strange problem with the license...

    Hi all!

    I have a very strange problem and I got nowhere with navigation on all ads in this forum. My environment is as follows:

    An ESX 3.5 update 3 Server with 2 cards integrated network interface and two Intel Quad Port cards VT. I put the on board to be the port of the console and the other on board to be the network of Virtual Machines. Here are the two separate networks, separated by a Cisco firewall. The IP of the console is 10.10.10.10 and virtual machines are on a network of 172.16.10.x. I also have a VC (physical) server with network cards two, one on the 10.10.10.x network and the other network 172.16.10.x. I installed the license server on the VC, and she won the 172.16.10.x listening address (although I discovered he will listen on the network 10.x.x.x). Then I edited the file hosts on the ESX Server to include the VC server using a name resolution. I ping the name/address of the server successfully. I also have my firewall configured to allow all traffic between two networks (as long as the traffic is initiated by the 10.10.10.x network). I cannot see any errors or not on the firewall.

    The strange thing is that I am able to the ESX by VC license but it stays there for a little while and then loses the configuration. Then, I try to do it again without success. I point to the assessment option and it works again. I then point to the license server and takes it. I can do the same thing on the ESX itself with similar results. I tried to use the name of host or IP address; exact same results. The error simply indicates that the server could not find the license server.

    The really strange thing is that even when the server is authorized, any action I do on the server (configuration, start and stop VMs, etc) is extermely slow and some of them simply because of time.

    Did anyone have clues here? I'm lost...

    Thank you in advance. ?:|

    Tom

    Hi BDHHI.

    Do not know if she could solve your problems but... According to what you say, the license server becomes the 172... interface as the default interface. Go to network connections-> Advanced Options-> advanced settings and make sure that the interface with 10.10 IP... is on top, services will have this default IP address.

    On which network will be launching connection, maybe I'm wrong, but that it could be open in both directions.

    Kind regards

    AlexNG

  • Problems with the keyboard navigation

    I try to use the caret browsing most of the time or all the time, but I have several questions. (So please don't tell me how to disable the keyboard navigation). Also, I would like to use the keyboard navigation without also having to use the mouse - I need now for most to overcome what I think is problems.

    The problems are:

    (1) switching to a page where already in accent circumflex mode requires using the mouse to move the focus somewhere before the caret navigation is logical. I tried the wrapper work using the search text or tab, but it's the two unrelible and against nature (even tedious).

    (2) while in insert mode I sometimes loose site of the cursor. I can continue to use the arrows until starts it page scroll which tells that the caret is on the top edge or lower, but I still don't see it.

    (3) while scrolling with arrows, cursor/caret hits a link or a title then re-use of the fl arrows increment lines at this level "indentation", without going through whole paragraphs of text. I need to use the mouse to reset the caret a text box.

    (4) I think it's the same problem as above, but I enter a mode where the up and down arrows take me to top/bottom of the page rather than up/down line as it should.

    (5) the cursor becomes more a region on the side of the page (such as a navigation bar), and there seems to be no way the mouse-less to get the cursor to the text box.

    (6) it seems (but I'm not positive of what really happens) after scrolling to the bottom of the page not in insert mode, I switch to insert mode and start using the arrows but caret navigation starts from where the focus was before--as forwards several page scrolls with the space bar.

    In summary, what I expected to happen is:

    (a) I navigate to a new page in insert mode and have somewhere logical automatically set focus as in the center of the current view.

    (b) set the mode insertion while on a page - automatically have focus on the Center or other places of logic in the current view.

    (c) never increment by something other than a line upwards or downwards. Especially, do not go to navigation link or next paragraph - what ever he is doing.

    I use Firefox 24.0 on XP and have the same problems in Mode without failure.

    This is a bug.

    Firefox Bugzilla entry here.

  • Satellite L850 - 1 H 4 - a strange problem with the FN key

    Hello

    I have a strange problem on my laptop. When I uninstall my PVAT my start "FN" key works, when I install it it s not working not properly. Its market not only the volume key (F9 and F10) without pressing the "Fn", if I want to press F9 or F10 I have to press FN + F9, even with the rest of the buttons.

    When I install PVAT I have to press FN, so I can use my F keys (e.g. F3 to search on the browser tool, alt + f4 - I have to press Fn + alt + f4), and I can't use real functions like mute, disable Touchpad etc. Use the volume keys only. Y at - it a problem if I run my computer without PVAT, this may affect its performance?

    Where could be the problem and can I fix it? I'm with Windows7 x 64, but the laptop was with no OS when I bought it. And there is a problem with this version, I bought its impossible to install the Pakc3 Service, it s with SP1, can be the problem? I put t know what to do... perhaps I run the laptop without PVAT, sounds good, because the buttons work fine without it, but I don't know if it interacts with something else.

    Thanks in advance!

    Its possible to use the function buttons by pressing another button without the use of the fn or FN.
    This option can be changed in the BIOS.

    Go to the BIOS by pressing F2.
    In the BIOS, choose Advanced-> system configuration Options
    Here you should find the option that allows to change the special function keys which allows you to use the function FN or without button Fn button

    By the way: this theme has already spoken here in the forum several times. therefore recommend that you use the advanced search to Forums before posting new thread

  • Problems with the keyboard on A60

    My keyboard/TouchPad has had something wrong with it majorly for the past month. He started with the TouchPad that is becoming more and more uncertain. Then one day I turned on my laptop and, after entering my password XP to go to my desktop, I was no longer able to type. Since then the keyboard was fine a few times and worked perfectly, but now he's back for does not. I'm completely confused because it allows me to type my password to Windows, so why it does not work after that?

    Hello

    It is really not easy to say what he can be, but it is obviously not a hardware problem. I read somewhere that when you try to use your Microsoft Keyboard, the computer does not meet to keyboard entries. This can happen if the MSKey Keyboard (Mskey.exe) is running on your computer. Try to quit the MSKey Keyboard tool. Check in the Manager of tasks under process if you can find it here.

  • Problem with the keyboard?

    Hello world...

    I have a problem that becomes serious with my 4 years old Satellite: 2 keys became non-responsive (most of the time). So, please, forgive what looks like typing!

    Frst supposed that there is little to dust under the keys and I decided to clean... but which looks much more serious: the rubber tip that makes the key - top pop upward, but also seems to transmit pressure to any sensor is below cracked! I guess this is the reason why my keys have become desensitized. See photo:

    http://myWeb.tiscali.co.UK/bmdtran/keyboard.jpg

    Now, I take good care of my beloved Satellite and is rather shockng that this problem can occur after a relatively short life. A that someone has experienced this problem? Someone at - it advice for me?

    Thanks in advance...

    Bruno

    Hello

    In my view, four years is a very good time with no problems, and if one or two buttons doesn't work properly I don't see it as something essential. Nothing can work forever.

    Back to your question: problem is that the repair of simple buttons is usually not possible and in those cases, the entire keyboard needs to be replaced. I can't imagine that the keyboard costs a lot of money. Believe me, the replacement of keyboard is not complicated and you can do it alone. You can also check ebay and buy a used one.

Maybe you are looking for