Programatically press CTRL key

how could I possibly do that?
the reason for this is that I'm trying to display a jtable with several rows already selected (as if someone would have kept CTRL pressed while selecting those rows)

You should programmatically select the rows, rather than trying to simulate a ghostly user. Take a look at the API.
And in the future, please post Swing questions to the [Swing forum.|http://forums.sun.com/forum.jspa?forumID=57]

Similar Messages

  • Select multiple, press ctrl key

    Hi experts,
    Can we create a fields with 6 options. Instead of using a picklist, the user request to allow "Select multiple, press ctrl key". i.e. you see all the 6 options under the field in a single view, then select > press control > system will automatically highlighted the selected fields.
    Thanks.
    Sab.

    Sab,
    Are you asking about a multi-select picklist. It's a picklist field that allows you select multiple values? Yes you can create those but do a search as there is a posting on all the limitations to these fields at the moment.
    cheers
    Alex

  • Select multple rows in ALV without pressing pressing CTRL key

    Hi experts,
    Is there any way that I can select multple rows in an ALV without pressing pressing CTRL key?
    I am using set_table_for_first_display method for displaying the ALV.
    I tried different options of sel_mode, but none of them works without the CTRL key.
    Thanks,
    Mohit.

    Hi,
    You can add checkbox using ALV grid display.
    Call your ALV grid as below. Pass 'wa_layout' with 'WA_LAYOUT-BOX_FIELDNAME' as your selection column name.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
          EXPORTING
            I_CALLBACK_PROGRAM       = SY-REPID
            I_CALLBACK_PF_STATUS_SET = 'F_GUI_STATUS'
            I_CALLBACK_USER_COMMAND  = 'F_USERCOMMAND'
            I_GRID_TITLE             = TEXT-026
            IS_LAYOUT                = WA_LAYOUT
            IT_FIELDCAT              = I_FIELDCAT
          TABLES
            T_OUTTAB                 = I_OUTTAB
          EXCEPTIONS
            PROGRAM_ERROR            = 1
            OTHERS                   = 2.
    Check below link for more help.
    [http://www.sapfans.com/forums/viewtopic.php?t=40968]
    Thanks,
    Archana

  • Pressing "Ctrl" key stop my VI

    Hi all,
    My VI stop responding when I press any special key. Try running my VI attached in this post. While the VI is running, press any arrow key, and you may find that the value of the indicator "Horizontal position" and "Vertical position" changes accordingly. However, once a special character key is press, such as the "Ctrl" key or "Caps Lock" key, the VI stop responding. Anyone can tell me how to avoid this?
    Thanks..
    Best regards,
    Julianti
    Solved!
    Go to Solution.
    Attachments:
    Ctrl key 8.6.vi ‏11 KB
    Ctrl key 8.0.vi ‏16 KB

    Also if you want to react to the stop button all you have to do is add the event. See the attached file.
    Tim
    Johnson Controls
    Holland Michigan
    Attachments:
    Ctrl key 8.6-2.vi ‏9 KB

  • "Undefined Function Key. Press Ctrl+F1..." Porting app from 6i to 10G

    I am running into a problem porting my application from Oracle Forms 6i to 10G. When I am querying a record based on a field that is not the first on the screen, I get an "Undefined Function Key. Press Ctrl+F1 for list of valid keys." error. I do not get the error using the same function keys from the first field on the screen. I also do not get the error if I click into another field (besides the one I an querying) before hitting my execute query key.
    I did some research, and found a fix that seems to work. I can add a WHEN_MOUSE_CLICKED trigger to the form and put in the following:
    Go_Item(:System.Mouse_Item);
    That seems to fix the issue. My problem is that I have close to 400 forms to upgrade. I would like to avoid adding this manually to every single form. I have looked into libraries, but I can't seem to figure out how to replicate a WHEN_MOUSE_CLICKED trigger using procedures. I was wondering if there was a way to use the Forms upgrade utility to add this trigger to every form it converts. Does anyone know if that can be done?
    Thanks in advance for your help with this.

    I'm not sure this solves the problem. This would call the trigger, but the trigger does not currently exist. I would still have to manually create the trigger in all 400 (or so) forms. Is there a way to add it in a more global way?
    Thanks.

  • How do I check if the ctrl key is pressed from within a mouseReleased actio

    How do I check if the ctrl key is pressed from within a mouseReleased action?
          addMouseListener( new MouseAdapter() {
             public void mouseReleased( final MouseEvent e ) {
               // If ctrl button is held down and mouse is clicked, do something
             }};

    Found it, I think
        e.isControlDown()

  • I inadvertently pressed CTRL+ another key (possibly V or B or N) and the text size of my bookmarked page was significantly reduced in size. I can't read it. How do I re-set the text size?

    I mistakenly pressed CTRL + another key (possibly V or B or N or whatever), when I was reading my e-mail. The text size shrank to a size that is useless to me, but I cannot seem to get the text size re-set to normal. Indeed all of the formatting on the page has been reduced (symbols, instructions, frames etc). Existing Firefox and returning to the bookmarked page makes no difference. How do I re-set the system?

    Hi,
    Please try '''Ctrl''' + '''0''' (zero). Alternatively '''View''' ('''Alt''' + '''V''') > '''Zoom''' > '''Reset'''.
    [https://support.mozilla.org/en-US/kb/how-do-i-use-zoom?redirectlocale=en-US&redirectslug=Page+Zoom Page Zoom]
    [https://support.mozilla.com/en-US/kb/Keyboard%20shortcuts Keyboard Shortcuts]

  • Key Press CTRL+Space

    How do I view a JInternalFrame by pressing CTRL+Space from a JTextFeild in another JInternalFrame? Using isControlDown() works but throws NullPointerException. Can it be done by using KeyStroke ? If Yes then how?

    Thanks! I changed the InternalFrame which I wanted to see after pressing. I used A JPanel in which there is a JList. What I tried is pretty simple and like this
    private void jTextFieldlBankIDKeyPressed(java.awt.event.KeyEvent evt) {
    try{
    int keyCode=evt.getKeyCode();
    int modifier=evt.getModifiers();
    int iSpace=java.awt.event.KeyEvent.VK_SPACE;
    if(evt.isControlDown()&& keyCode==iSpace){
    jPanel2.setVisible(true);
    //setValueAtTheList();
    //jList1.grabFocus();
    System.out.println("Key Pressed");
    }catch(NullPointerException e){
    I got what I need but the exception is there like before,
    java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicInternalFrameUI$1.actionPerformed(BasicInternalFrameUI.java:153)
    at javax.swing.SwingUtilities.notifyAction(SwingUtilities.java:1502)
    at javax.swing.JComponent.processKeyBinding(JComponentKey Pressed
    .java:2422)
    at javax.swing.KeyboardManager.fireBinding(KeyboardManager.java:253)
    ������������.

  • Determine if Ctrl key is pressed.

    I want to perform some actions when handling Mouse Move event only when Ctrl key is pressed. Is there a way to determine pressed state of Ctrl key?

    Hi Jonni,
    I've attached a simple example VI that uses the Mouse Move event filter to check for mouse movement and calls user32.dll to check if CTRL key is pressed. I think that is what you are looking for.
    Sev K.
    Applications Engineering Specialist | CLA
    National Instruments
    Attachments:
    GetCtrlKey.vi ‏12 KB

  • 'FRM-41008 - Undefined function key. Press  Ctrl + F1... ' Urgent Pls help

    Hi All,
    We are facing below issue in Oracle 10g Forms.
    We are opening one screen with mutlirecord block and query the recod(First Session) and at the same time we are trying to query one more session(Second session) with same data.
    While querying second session we have blocked the user to proceed further by using select ..... for update of columns and user will get error message
    'Transaction is already locked by another user....'. and we have kept second screen opened.
    Afterwards we are going back to first screen in first session and trying to update the record (Change price column and navigate to next item by using tab key. We are not using anhy other key) System is not allowing to update the record and screen is freezed and cursor control will go to items randomnly and displays below error message.
    'FRM-41008 - Undefined function key. Press Ctrl + F1 for list of valid keys.
    Could somebody pls explaining why above error message 'FRM-41008 ...' is showing for locking record issue ? Any trigger is firing above error message ?
    Thanks in advance
    Biju

    Thanks for the reply but we don't have key others trigger ,we have only when-new-form-instance trigger in form level. That being the case, I recommend you run your Form through the Forms Debugger to see where the form is generating this error. If you are unable to use the Forms Debugger, then I suggest you try running your form with the Forms Runtime Diagnostics (FRD) to see if you can discover the cause of the error. Take a look at this thread for a description of FRD and how to set it up: Re: dbms_session exception without any error. Although, the topic of this thread is not the same as yours, my reply is related. :)
    Craig...

  • My homepage shrunk when I accidentally pressed the ctrl key and the underscore key ( I mean't to press the shift key to underscore)

    I was entering a website a wanted to visit which required an underscore,
    but instead of pressing the shift key along with the ' underscore ' key (-_), I pressed the ctrl key and my firefox homepage shrunk to where the print was unreadable. How do I bring the homepage back to where it should be?

    Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
    See:
    * http://kb.mozillazine.org/Zoom_text_of_web_pages

  • I am unable to press ctrl "F" to find anything or scroll down with my error keys

    I can't select anything, scroll down or even press ctrl f to find things like I use to

    Under what coditions is the happening and with what interface - the Flash IDE or the player?

  • USB devices stop when ctrl key is pressed

    We have a couple of Lenovo 3000 N100 notebooks that are exhibiting the same problem - with USB external mouse and keyboard attached, the "Ctrl" key on the notebook will kill the attached USB devices - the system gives a couple of audible warnings then the USB mouse will reappear - depressing the same key on the external USB keyboard does not give the same symptoms.  Has anybody else had a similar problem?  Very aggravating when trying to tag files etc..
    Thanks,
    gws

    I thought something was wrong with the bugbase, but apparently I just needed to "save" my communication settings (the website won't let you do anything else until then).
    Bug filed is here: https://bugbase.adobe.com/index.cfm?event=bug&id=3613482
    It's not something everyone will see, but when it happens the result is confusion and a buggy feeling application.

  • Revolve 810 G1 Unlock Computer when in Tablet Mode. Press CTRL-ALT-DEL or Windows Security Button

    1.  I have an Revolve 810 G1
         Running Windows 7 Pro (64 Bit).
    When I change the screen to Tablet Mode
      (Folding tablet over keyboard and using as tablet).
    I lock my computer.
    2.  What to know how to unlock without having to Open back up and use the CTL-Alt-DEL keys.
    When Locked screen shows:  Press CTRL-ALT-DEL or use the Windows Security Button to unlock this computer.
    I would like to use the Windows Button on the bottom of the screen
       (One Used in Windows 8 to change between Desktop and Metro) to Unlock screen And bring up on screen keyboard to put in my password.
    This is probably how it should work, but it does not work.
    Even bringing up the onscreen keyboard via the blue power button On the screen to Ease Of Access does not work.
    The CLT-ALT-DEL on the on screen keyboard will not unlock the screen.
    P.S.
    Where is that Windows Security Button when you need it? 
    Thanks,
    Rog

    If you are using Windows 7 (not Windows 8), you should be able to touch the Ease of Access button at the lower left of the screen, then select Type without the keyboard (On-screen keyboard). When the on-screen keyboard pops-up, press CTRL, then ALT, then DEL. You should get a password prompt; the on-screen keyboard will stay visible unless and until you close it.
    Although I am an HP employee, I am speaking for myself and not for HP.
    Please click the little thumbs-up dealybopper to the lower right if my reply was helpful to you. Please mark Accept As Solution if it solves your problem. This will help others, too!

  • Tecra M10 - Stuck CTRL key issue -- perhaps to do with BIOS?

    Hello and thanks for reading.
    I recently switched my Tecra M10 to Windows 7 (from XP) and it soon developed the dreaded "stuck CTRL key" issue. This causes the keyboard to behave as if the CTRL key is permanently depressed. Sometimes hitting a combination of keys, or bringing up the onscreen keyboard, temporarily solves the issue, but then it returns.
    It seems to be an issue many people have, with no simple solution. I've looked at every thread about it I can find, and tried many things to do with drivers etc. without any success.
    So firstly, if anyone knows a remedy that works for this particular machine, I would be very grateful to learn it!
    Then, there are two things I've not yet done: update BIOS and disable pinch zoom.
    I was looking at the following BIOS update:
    http://www.toshiba-asia.com/sg/support/drivers/details/25244
    ... which is version 3.00 and seems to be most recent. My own version is 1.90.
    However version 3.00 is labelled "For PTMB0* ONLY". I don't know what this means or whether it applies to me. Can anyone help? Should I install this BIOS?
    For the pinch zoom, I've been told that disabling it does sometimes cure the CTRL problem -- but I can't find any pinch zoom facility on the M10. I suspect it simply doesn't have one. Is that right?
    Many thanks for any help you can give.

    Hi
    > I was looking at the following BIOS update. which is version 3.00 and seems to be most recent. My own version is 1.90.
    There are different Tecra M10 models on the market.
    Check the labels at the bottom of the unit. There you should find some numbers like for example PTMB0E-01K00LGR
    The first 6 characters are important: for example PTMB0E
    I assume your notebook belongs to European series.
    In such case you should check the Toshiba EU driver page for possible BIOS update.
    http://www.toshiba.eu/innovation/download_drivers_bios.jsp
    However, on Toshiba EU driver page you will find also the BIOS v3.0 for all European Tecra M10 units.
    Anyway, back to the CTRL button issue: guess what, you should connect an external USB keyboard and should check how the CTRL button acts.
    In case the USB keyboard would work properly, the CTRL button of internal keyboard is affected and you will need to replace the internal keyboard.
    PS: it could be possible that the option "sticky keys" has been enabled. To disable this function, you have to press SHIFT button 5 times in the row.

Maybe you are looking for