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

Similar Messages

  • 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()

  • 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.

  • Checking for Ctrl key after DropTargetDragEvent

    Hi,
    I need help with a program which contains a table and a tree. A DropTargetDragEvent is fired whenever selected line(s) from the table are dragged to the tree. Upon dragEnter() I do some action. How can I detect if the Ctrl key is pressed at that moment?
    Any suggestions are highly appreciated.

    It doesn't make a difference if I call dropTarget.setDefaultActions(DnDConstants.ACTION_COPY_OR_MOVE) or not.
    But I just noticed that event.getDropAction() returns DnDConstants.ACTION_MOVE when I press the SHIFT key and DnDConstants.ACTION_COPY otherwise. This is better than nothing but actually I wanted to detect the CTRL key.

  • Detecting the shift or ctrl key in the mousePressed event, ...

    In the mousePressed event, how do I detect
    if the shift or ctrl key is pressed?
    Thanks,
    Ben

    What I've posted is for j2sdk1.4, check the link below for older version:
    http://java.sun.com/j2se/1.4/jcp/j2se-1_4-rc-mr_docs-spec/apidiffs/java/awt/event/MouseEvent.html#DIFF1
    ;o)
    V.V.

  • "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 to determine the exact key pressed when numlock disabled?

    Hi there,
    I am trying track the keyboardevent that triggered by pressing numpad keys as hotkey, but when the numlock is disabled, the same keycode, same keylocation was gotten as pressing in the standard keyboard. how can I determine if the numpad was pressed or the other control keys were pressed?
    Thank you!
    Andy

    Hi there,
    I am trying track the keyboardevent that triggered by pressing numpad keys as hotkey, but when the numlock is disabled, the same keycode, same keylocation was gotten as pressing in the standard keyboard. how can I determine if the numpad was pressed or the other control keys were pressed?
    Thank you!
    Andy

  • 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

  • '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

  • 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

  • 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.

  • Is there a way to swap the Fn key and left Ctrl key

    Is there a way to swap the functions of Fn key and left Ctrl key on the keyboard. I'm used to other keyboards where the keys are switched and I keep pressing Fn when I want to press Ctrl.  I figure I'll get used to it eventually, but when I use the laptop in a docking station with a regular keyboard the control key is in one spot and undocked with the Lenovo keyboard the function key is there instead, which makes it hard to get used to.
    If not is there a way to disable the Fn + Space bar function that changes the screen resolution. The programs I use use control + space heavily and my screen resolution keeps changing when I don't want it to.
    It's a small thing I know, but very maddening.

    Thanks, I took the survey. It's interesting the questions on there were asking about location of keys like page up and page down. I find the position of those keys are not that important to me because I don't use them that much and don't seem to mind looking at the keyboard to find them. Also they are almost always in different spots depending on whether you are on a desktop or laptop keyboard so I guess I'm used to unconsciously switching depending on which keyboard I'm on.
    But the left control key is one of the most heavily used, at least by developers like me (control+c to copy, control+v to paste, and control+space for code assist, shift + control + f to format code, shift + control + r to find resources, etc...). I have to hit that Ctrl button 1000 times a day. And the key is in the bottom far left corner on every keyboard (desk top and laptop) I've ever seen until now. Having to remember to look down at the keyboard to find the key is proving difficult and I think is actually hurting my productivity. Especially control+space (when you are expecting a popup to automatically complete the line of code you're working on and instead the screen blinks, resizes and your whole editor loses focus it really breaks your flow of thought, so thanks a million for helping me turn off the silly screen zoom feature).
    Hopefully I'll get used to it like with the other keys like page up and page down although I've had the laptop for two weeks and it's proving difficult. If I had know that Thinkpads have this layout and how maddening it would be to get used to it I probably wouldn't have bought it, even though everything else about it is great. It's amazing how such a small thing can become such an irritant.
    Well thanks again, and if anybody from Lenovo engineering is reading this post, my vote is for some bios setting on the T61P that swaps the functions of Fn and Left control key. It would save me a lot of grief anyway.

  • Can't set keybinding with ctrl key ?

    I use compiz in lxsession. If I set compiz commands and assign ctrl key it resets back to something without ctrl and also If I set guake to ctrl+alt+space I get keybinding error. For example.
    I want to set ctrl+alt+del to lxde-logout. As I set the key combination in ccsm and press back to come to ccsm main window the command sets to alt+del. I tried with tilda as well but to no avail. What should I do ?

    I've had similar problems with compiz. I'm not sure if it can do this at all.

Maybe you are looking for

  • How do I turn off autoswitching to a new tab???

    When I select "Open in a new tab" in IE, the browser automatically switches to the new tab.  I *HATE* this behavior as I like to open multiple news stories and then read them one at a time. I have already unchecked the option Internet Options--Tabs--

  • Slow All of a Sudden

    I've tried everything I know to correct slow performance. All of a sudden my computer is running really slow. Even if only firefox is open, video playback with webbrowser is stuttering horribly. I would really appreciate help.

  • Images Split After Saving in Camera Raw

    I am editing in camera raw from Bridge, I edit, then save. At first the thumbnail remains the same then shortly it becomes 2 half images. Very frustrating!!! I just started this new workflow giving bridge a try and I was very excited about it .. unti

  • How to parse xml file in midlet

    Hi Guys, i wish to parse xml file and display it in my midlet. i found api's supporting xml parsing in j2se ie., in java.net or j2se 5.0. Can u please help me what package to use in midlet? how to parse xml info and display in midlet? Plz reply soon.

  • How should i increase over all buffer hit ratio.....

    Hi all, As shown below if my DB2 databse buffer Qulaity is low .. How should i increase over all buffer hit ratio.. Please advice on any sap standrd notes or procedures Number                                    1 Total Size