Change keys in keyDown event

Hi, I want to create a new TextInput, that changes then keys
while typing, lets say:
when I type "A", shows "B"
when I type "X", shows "Z"
or something like that.
I can´t do this to work..
Thanks.

It's not precisely what you asked for, but I'm sure you'll
get the idea.
Use this code in an actionscript class called
components/KeyModifier.as
Add the code to your app with <components:KeyModifier/>
Be sure to add xmlns:components="components.*" to your parent
component's tag.

Similar Messages

  • Arrow key in the keydown event

    Hello,
    I used the keydown event to display the characters on the Screen depending on the key which is pressed,
    but if I press arrow keys and want to display "x" on the extreme right side of the characters for example :
    abcsdex
    here x is displayed when left arrow key is pressed. I tried it but x is not displayed where I want it is displayed on the extreme left of the characters or in between the characters.
    Thank you.

    I used the keydown event to display the characters on
    the Screen depending on the key which is pressed,
    but if I press arrow keys and want to display "x" on
    the extreme right side of the characters for example
    abcsdex
    here x is displayed when left arrow key is
    pressed. I tried it but x is not displayed where
    I want it is displayed on the extreme left of the
    characters or in between the characters.
    Thank you.write a KeyPressed event.get a ASCII value of the key you want to press.Then append the ASCII value of that pressed key to the current string in your desired position.First store the current string to a String variable.

  • Best practice for responding to keyDown event

    I am writing my first Cocoa application.  It's a simple utility app -- a calculator.  I've got everything working, the last thing I want to add is I want the app to respond to key press events.  So, you could click the "4" button with the mouse, or you could just press the "4" key on the keyboard.  I'm reading all the event handling documentation, but I'm not picking up on the recommended approach for getting an NSResponder (or NSView) that handles the event.
    I can make a subclass of NSWindow and tell the interface builder to make the main window of that type.  Then when I override the keyDown message in my new NSWindow subclass, it gets the events, but I'm not sure how to connect it to my application delegate class (since I basically just want to switch on the key pressed and call the corresponding message in the delegate that the button "select" action targets.
    Or, I think I heard something about doing this by changing the super class of the application delegate class from NSObject to NSView, or NSResponder or something.  I haven't poked at that idea much, but I'm not sure how to actually get the application delegate object then actually set up as the first responder (I think that's what I'd want to do).
    So, I'm hoping someone can give me specific directions on how/where I should implement my keyDown method, but I'd also like to understand what the recommended "best practice" is for doing this.  What would Apple say is the right architecture for doing this?  I'm as much interested in learning how to make this work as learning the Apple design pattern behind it.
    The structure of my program is as follows:
    I have one nib file (actualy a .xib) where I've designed my window with a textbox for display and a hand-ful of buttons.  I've registered outlets and actions from there to the AppDelegate class (the one that the standard project template sets up for you).  Following the MVC pattern, I then have a Calculator class that the AppDelegate initializes and all the actual logic of the calculator is in that class.  The AppDelegate basically just responds to messages from the buttons, passes them along to methods in the Calculator class, and then asks the Calculator for the current display value and updates that back into the textbox. So, the graphical elements in my nib file are the "view", the AppDelegate is the "controler" and the Calculator class is the "model".  Right? 
    So, who is supposed to be handling keyDown events?   Seems like the view should capture them and send them to the controller, but how do I set that up?

    Dear Noppong,
    You can do it with multiple ways like :-
    1. Get the current host name and make complete URL with using host name for the webdynpro iview.
    request = (IPortalComponentRequest) this.getRequest();
    HttpServletRequest req = request.getServletRequest();
    StringBuffer strURL = req.getRequestURL();
    2. Create the KM Document or Link for webdynpro Iview OR Create the WPC Web Page for the webdynpro ivew
    Refer to [http://help.sap.com/saphelp_nw70/helpdata/en/06/4776399abf4b73945acb8fb4f41473/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/06/4776399abf4b73945acb8fb4f41473/frameset.htm]
    [http://help.sap.com/saphelp_nw70/helpdata/en/06/4776399abf4b73945acb8fb4f41473/frameset.htm|http://help.sap.com/saphelp_nw70/helpdata/en/06/4776399abf4b73945acb8fb4f41473/frameset.htm]
    [http://help.sap.com/saphelp_nw70ehp1/helpdata/en/ff/681a4138a147cbabc3c76bde4dcdbd/content.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/ff/681a4138a147cbabc3c76bde4dcdbd/content.htm]
    Hope it will helps
    Best Regards
    Arun Jaiswal

  • B1DE / KeyDown Event  ...

    I have a problem with an addon i'm developing  .. I have a matrix on a screen for which i'm trying to capture a KeyDown event (actually the 'Del' key but it seems to happen with all keys) ..
    I attach an item listener to my matrix as shown below ..
      [B1Listener(BoEventTypes.et_ITEM_PRESSED, true)]
            public virtual bool OnBeforeItemPressed(ItemEvent pVal) {
                Form form = B1Connections.theAppl.Forms.Item(pVal.FormUID);
                Item item = form.Items.Item("mtx_0");
                Matrix matrix = ((Matrix)(item.Specific));
                // ADD YOUR ACTION CODE HERE ...
                B1Connections.theAppl.MessageBox("Key Pressed", 0, "Ok", null, null);
                return true;
    I notice there is no KeyDown event so i assume the ItemPressed event can be used .. Is this correct  ?
    Also in my main add on I have ..
    // ADD YOUR INITIALIZATION CODE HERE     ...
                EventFilters filters = B1Connections.theAppl.GetFilter();
                //  BoEventTypes.
                EventFilter filter = filters.Add(BoEventTypes.et_KEY_DOWN);
                filter.AddEx("MyAddonScreen");
    ... to enable global trapping of keydown by my addon ..
    Any help gratefully received  ..

    Thanks David  ..
    In that case B1DE doesn't expose a KeyDown Event  .. So I assume that I must create a separate
    key down event handler in my main addon code  .. maybe like  ..
    // ADD YOUR INITIALIZATION CODE HERE     ...
                EventFilters filters = B1Connections.theAppl.GetFilter();
                //  BoEventTypes.
                EventFilter filter = filters.Add(BoEventTypes.et_KEY_DOWN);
                filter.AddEx("MyAddonScreen");
               B1Connections.theAppl.ItemEvent += new _IApplicationEvents_ItemEventEventHandler(theAppl_ItemEventHandler);
    .. and then an event handler ..
    private void theAppl_ItemEventHandler(string formUID, ref SAPbouiCOM.ItemEvent pval, out bool BubbleEvent)
                BubbleEvent = true;
                Form form = B1Connections.theAppl.Forms.Item(formUID);
                if(form.TypeEx.Equals("MyAddonScreen"))
                    B1Connections.theAppl.MessageBox("The ItemEvent has been trapped ", 1, "Ok", "", "");
    Is this the correct best practice ?

  • Showing only key photo from events within an album using iphoto 11

    I'm using iphoto 11 and want to show only the key photos from events in an album. I don't want to see every photo from every event in the album, I only want to view the key photos from each event in the album. When I drag the event into the album every photo from each event is shown in the album.
    I do have some events in an album with only the key photo showing but can't get all the events to display this way in the album. Any suggestions?

    Try trash the com.apple.iPhoto.plist file from the HD/Users/ Your Name / library / preferences folder.
    (On 10.7: Hold the option (or alt) key while clicking on the Go menu in Finder to access the User Library)
    (Remember you'll need to reset your User options afterwards. These include minor settings like the window colour and so on. Note: If you've moved your library you'll need to point iPhoto at it again.)
    What's the plist file?
    For new users: Every application on your Mac has an accompanying plist file. It records certain User choices. For instance, in your favourite Word Processor it remembers your choice of Default Font, on your Web Browser is remembers things like your choice of Home Page. It even recalls what windows you had open last if your app allows you to pick up from where you left off last. The iPhoto plist file remembers things like the location of the Library, your choice of background colour, whether you are running a Referenced or Managed Library, what preferences you have for autosplitting events and so on. Trashing the plist file forces the app to generate a new one on the next launch, and this restores things to the Factory Defaults. Hence, if you've changed any of these things you'll need to reset them. If you haven't, then no bother. Trashing the plist file is Mac troubleshooting 101.

  • Catching Alt Key Press with the Key Down Filter Event

    I am writing an application that requires specific key combinations using ctrl, shift, and alt in addition to a function key (F1, F2, F3, etc).  The application works great except for when I try to catch an alt key press.  The alt key press does not seem to fire an event eventhough it is an option in the PlatMods cluster as well as the VKey enum.  When I press the alt key when my application is running the cursor changes to a normal mouse pointer from the usual finger pointer and prevents any other key presses from going through (in addition to not firing an event itself).
    I have tried completely removing the run-time menu, which doesn't seem to help.  I currently discard all keys after I handle them in my event structure.
    I really hope that the only solution isn't using a Windows DLL.  Any suggestions or ideas at all would be greatly appreciated.
    Thanks,
    Ames

     Hi Ames
    As Kileen has said Khalid has already given you a good solution to detect the ALT key.
    I have another approach that might let you stick to your event-driven approach. I suggest that you have another loop in your app that polls the keyboard using the Input Device utility vi's. When this poll loop sees an ALT + KEY combo it raises a dynamic user event and will be processed in your event structure. This means you can keep your key down filter event to process the CTRL + KEY and SHIFT + KEY events.
    Example attached in 7.1
    cheers
    David
    Attachments:
    Catching Alt Key Press Poll with Events(151551).vi ‏89 KB

  • KEY DOWN in event

    When use KEY DOWN in event ,this event triggered for every key (keyboard) press ,
    the question i need event triggered for just 1 key pressed ; for example press F2 the event triggered and no triggered for the other key of keyboard ;
    thank you
    Forza Juventus
    Solved!
    Go to Solution.

    in the example ;
    I need the "Event Change" increment just when i push Key F2 ; Thanks
    Forza Juventus
    Attachments:
    Boolean Action_LV85.vi ‏9 KB

  • Backspace not detected as KeyDown Event

    Hi
    I'm trying to determine if the back space is pressed on my WPF. And I'm getting no where!
    My code (which is the event handler for the KeyDown event for a textbox)
    private void CompanyName_KeyDown(object sender, KeyEventArgs e)
    MessageBox.Show(e.Key.ToString());
    If I press a number, return (enter), letter or even a function key (F2, F3 etc) it works. But, delete, backspace and spacebar do not cause the event to fire.
    Any idea why?
    Dave

    Hey DaveRook, I hope you're fine.
    I believe you may check the following approach:
    if (Keyboard.IsKeyDown(Key.Back)) //Also "Key.Delete" is available.
    //Your code goes here..
    Please, mark my reply as Answer if it helps or vote it up if it gives a key to the solution.
    Thanks in advance and good luck.
    Ahmed M. Gamil
    "It is not titles that honor men, but men that honor titles."

  • Keydown events in subpanel

    I have read some other posts about this sort of problem, but the solutions offered there have not worked for me.  What I want to happen is the VI in the subpanel should respond to keydown events.  Everything I have tried to get this to happen has been intermittent at best.  What usually happens is that a mouse click on any control or indicator in the subpaneled VI will then cause all keydown events to work on the VI as I wish, but you have to do that initial mouse click first.  Does anyone know how to get a VI in a subpanel to respond to keydown events as soon as the VI starts running in the subpanel without any other interaction in the subpanel first?  Assigning keyfocus and registering for events are the general suggestions in other threads about this sort of situation, but none of that has worked for me in the desired fashion.  I am using LV 8.0.1 on WinXP if any of that matters.

    OK, the basement flood is fixed for now, and the deadline was met on Friday.  Here is a little demo of the problem.  The basic idea is that the subpanel will be used for several different little recipe guides like the one included.  Other things in the code could require bailing out of the recipe, so there is a global to force an early exit, but normally you would exit when the last step in the recipe finished.  The code does things based on where the user is in the recipe, so waiting for the user to press any key is the way the code knows when to do the next step.  I want the user to have to do nothing extra to get the keydown to work right from the beginning.
    Attachments:
    testsubpanel.llb ‏67 KB

  • Change the colour of events in iCal

    I need to change the colour of events/appointments in the Mac iCal.  I have imported all of my Outlook calendar via google sync and all my appointments are now just one colour.  I have my medical appointments coloured in orange so they stand out each week (I have many) and all my personal events a different colour, and my volunteer work a different colour so that I can see at a glance in week view what I am up to. Looking at one week with every appointment in one drab colour is not nice.
    I notice that different calendars are different colours, but I dont want separate calendars as I need to sync with google to share the calendar with Android phone and iPad.
    Please can you let me know how to turn this feature on.  Many thanks.

    Click calendars at the bottom of the page the click on the i symbol for info and then you can select the colour you'd like.

  • So in the last few days I've noticed that pressing my volume change keys actually isn't changing the volume on my macbook pro at all. When I press the volume up or down keys, it makes the recognisable pop sound but stays at the same volume while the squar

    So in the last few days I’ve noticed that pressing my volume change keys actually isn’t changing the volume on my macbook pro at all. When I press the volume up or down keys, it makes the recognisable pop sound but stays at the same volume while the squares go up or down. I mute it but my computer still makes sound. It’s the same with the volume control up the top of the screen, too. I slide it up and down and it doesn’t change the volume at all. The only way I can change the volume is with my speakers or the program I’m in (iTunes, VLC etc). I restarted and it seems to be okay then I go to change it a couple minutes later and it’s back to not working again.
    I’ve checked my settings- the “use all F1, F2, etc. keys as standard fuction keys” is not switched on, and I have tried a suggestion of moving the com.apple.systempreferences.plist file out of the library and onto the desktop and restarting and neither of those seem to make any difference whatsoever. I’ve tried to find online forums but the only suggestions I found were those two and they didn’t work.
    I’m just annoyed because I usually have the worst luck with technology but my macbook had been going strong and I got it because of the apparent lack of things that could go wrong, but of course even if there is one thing that could go wrong it will happen to me.
    Please help!

    You migh give resetting your NVRAM a try:
    http://support.apple.com/kb/ht1379

  • How do you change the color of events on ICal.

    How do you changed the color of events on ICal? I was able to do this when I utilized ICal on the Snow Leopard system but can no longer do this with Lion.
    I know that I can select the Calanders list, but when I create a new "Calander" it doesn't allow me to choose a color and it doesn't show up in my list when working within an event.
    Thanks!

    Phoebe,
    Right-click on the new calendar and select "Get Info."
    Make sure that the ✓ mark is selected.
    Then choose the color from this pane:

  • Need notification on shared calendar of any changes/modifications to an event

    I share a few calendars with co-workers and family members. When one or the other made any changes/modifications to an event, it notified both parties but since the new updates, we no longer get the notifications. The changes show up on the calendar but no alert to notify of the change which defeats the purpose because we need to know about the change prior to the actual event.

    Hi cooks38401,
    Thanks for the question. After reviewing your post, it sounds like you are not receiving Notifications from Calendar. I would recommend that you read these articles, they may be helpful in troubleshooting your issue.
    Calendar: Get Calendar notifications
    Calendar: If you’re not receiving alerts
    Thanks for using Apple Support Communities.
    Have a nice day,
    Mario

  • G'day.  I am using iMovie 11 and need to clear disk space.  How can I do that using an external drive, leaving me the option to go back and make changes or access old events or projects from that external drive?

    G'day.  I am using iMovie 11 and need to clear disk space.  How can I do that using an external drive, leaving me the option to go back and make changes or access old events or projects from that external drive?

    The slightly bigger question is whether you want to move all movie content to the external drive (essentially meaning that drive will always need to be attached when you're working with your videos), or whether you just want to archive older videos off to the external drive.
    If you want to move all videos, then just move the 'Movies' folder in your home directory to the external drive, then create an alias of the external 'Movies' back in to your home directory. Now the 'Movies' icon in your home directory will point to the external drive and everything will just work (as long as the external drive is attached when you launch iMovie)
    If you want to archive older movies then each Movie should have its own subdirectory within your Movies folder. These can easily be moved off to the external drive, and moved back should you ever need to work on those movies again.

  • Is there somebody out there to shed some light on this? Change keys, tempo in Soundtrack Pro greyed out?

    From the amount of posted unanswered questions like mine one should be able to see that there are more than a few people confused about the greyed out "Change keys, tempo in Soundtrack Pro" (and for that matter in Apple Loops Utility, Logic, GarageBand)! What does it take to help out the less adept budding beginners? Please don't post read the manual or search for... we all know you can spend days with no results. There is nothing better than a friendly person (wizard) who knows and has done it all, giving clear step by step instructions. Please lay it out for us lesser brains. Thank you so much for your time and patience.

    rs = stmt.executeQuery("SELECT gender FROM gymuser WHERE Username= 'userName' ");
    in this line i think there is some error put it like this
    rs = stmt.executeQuery("SELECT gender FROM gymuser WHERE Username= '"+userName+"' ");
    Try to put some SOPs in between, so that u can check in logs(if using tomcat)where u r making mistake.

Maybe you are looking for

  • ICloud is no longer syncing my calendars.

    iCloud is no longer syncing my calendars. They are showing up as "iCloud" calendars in iCal, but aren't syncing either to the web portal or to other devices. In System Preferences, the iCloud calendar and reminder toggles will not stay checked. They

  • Problem in F4 help in Tcode PSV1

    Dear All In PSV1, when I select a business event and goto menu Attendance -> Correspondance -> Manual Output. A F4 help dialog appears. When I select a value from this F4 help it by default passes the last value entry. I even debugged the code and ch

  • Diff char in variable and procedure call

    I understand the difference between Char en Varchar. What I don't understand is the different behaviour of Char when assigning a plain variable and when assigning a procedure call variable. I've created this sample code: declare   v char;   procedure

  • RE: (forte-users) Forte 3.5 patch

    No. Number 2 has been reported as a bug and will be fixed in the next release. Number 1 I was not aware of. -----Original Message----- From: Nina Gelderbloem [mailto:[email protected]] Sent: Friday, April 20, 2001 2:44 AM To: [email protected] Subjec

  • Process Import Supplier Addresses

    After submit Process ImportSupplierAddresses, the following message appears: Process contains parameters and cannot be rendered locally. Please check your portlet configuration to enable launching this process inside a portlet. Do you know what to ch