Access to Scroll Lock State

Jason,
This is a follow up question to regarding my interest in keyboard functions,...
I could not find the details in the CVI documentation
regarding EVENT_KEYPRESS in a panel, but I learned that
"eventData1" contains the key char, and eventData2
contains a pointer to both the char and the extended
ascii char! So I am able to get most of what I need.
Still remaining is the question of how to get the scroll-lock state and Numlock/CapsLock etc.
Are these variables that I can get at?
What does *callbackData point to? Is it a pointer to
a struct with keyboard data?
Thanks DraftsmanEE Dude

Hello
You can use the GetKeyboardState(). Its one of the Win SDK functions. You can install the SDK's by starting up the CVI installer from the control panel (it doesnt install by default). The SDK help lists all the function parameters and the appropriate libraries and headers you would need. I found some sample code on how to use the function on from the MSDN (http://msdn.microsoft.com):
The following sample program turns the NUM LOCK light on if it is off. The SetNumLock function defined here simulates pressing the NUM LOCK key, using keybd_event() with a virtual key of VK_NUMLOCK. It takes a boolean value that indicates whether the light should be turned off (FALSE) or on (TRUE).
The same technique can be used for the CAPS LOCK key (VK_CAPI
TAL) and the SCROLL LOCK key (VK_SCROLL).
/* Compile options needed:
#include
void SetNumLock( BOOL bState )
BYTE keyState[256];
GetKeyboardState((LPBYTE)&keyState);
if( (bState && !(keyState[VK_NUMLOCK] & 1)) ||
(!bState && (keyState[VK_NUMLOCK] & 1)) )
// Simulate a key press
keybd_event( VK_NUMLOCK,
0x45,
KEYEVENTF_EXTENDEDKEY | 0,
0 );
// Simulate a key release
keybd_event( VK_NUMLOCK,
0x45,
KEYEVENTF_EXTENDEDKEY | KEYEVENTF_KEYUP,
0);
void main()
SetNumLock( TRUE );
Hope this helps
Bilal Durrani
NI

Similar Messages

  • I can't find the Scroll Lock button on my notebook

    was in a program when something happened to the box I had up on screen, was told to hit the scroll lock key, but I can't find the scroll lock key - can anybody help me??
    This question was solved.
    View Solution.

    Hi I was out in the world when I ran into the "No Scroll Lock" key / function on mt HP DVP Laptop.  Really, HP could not add a ctrl + function key for this? 
    There is an easier solution than hooking an external keyboard, especially if you are not in the home/office. 
    USE THE WINDOWS ON SCREEN KEYBOARD!  I found this on another post on the HP board. In Windows 7 you can easily find the On Screen Keyboard  by pressing the windows globe on the bottom right corner that brings up your 'Start Menu" and type in "On Screen" in the search box at the bottom.  You should see "On Screen Keyboard" app come up at the top.  Alternately, go to Control Panel, Ease of Access, and you will see "Start On Screen Keyboard".  Once enabled when you select the on screen application it comes right up.  You can leave the on screen minimized at the bottom if you need to toggle Scroll Lock on and Off. 
    So there is a solution that does not include finding an external keyboard.  But HP, this can't be a difficult thing to add to the bios, no?  Like Alt + Fn Num Lock? 

  • How to scroll lock on a mac

    Looking to upgrade my mac and was wondering if the new mac book pros have the capability to scroll lock.  I need this feature for programs I use at home for work.  Thanks I know it's a silly question but it is not easy possible to do on my older macbook.

    cyndycapecod wrote:
    I can't scroll lock on my current MacBook now that is the problem.  I don't have a F14 key which seems to be the key people suggest to try or the F12 +alt+function.  I even purchased an external full keyboard hoping this would work but to no avail.
    The catch is that OSX will intercept the function keys and use them for itself.  Make sure you don't have anything using F14.  Either in System Preferences, or any other third party add-ons that give mouse or keyboard shortcuts or extras.
    Since Macs don't use Scroll Lock, this is why I mention it's up to the app to give you a scroll lock.
    ...I'd hate to purchase a PC to do work from home but I may have to.
    I'm not using "apps" I am logging in remotely from home to my work PC using GoToMyPC from there I can access any program that is on my work PC.
    Thanks
    In your case the "app" is GoToMyPC.  See if GoToMyPC has a option to "send key".  I use LogMeIn, which has a send ctrl-alt-del, but not send Scroll Lock.  Hopefully GoToMyPC does, which would be best in your situation.
    Otherwise there are only two ways I know of to do what you want from within OSX:
    Use Windows' onscreen keyboard on the office computer.  (Start, All Programs, Accessories, Accessibility.  Different versions of Windows may have it in slightly different locations.)  With a large screen on a desktop, this may be acceptable.  (On LogMeIn, I can have the host screen "fit" or zoomed in to my remote screen's size, which makes the onscreen keyboard usable for me.)
    Microsoft Remote Desktop.  The Mac app for Remote Desktop Connection (sometimes known as Remote Desktop Protocol or Terminal Services) has an option that you can map keys.  I verified that Scroll Lock is possible.  Due to the limited number of keys on the Macbooks, you'll have to find something that's not in use by either OSX or Windows.  (For example, in the test, I used Shift-F12 for Scroll Lock.)
    The catch with 2) is that you'll need to be able to configure port forwarding on your company's firewall, or preferably have a VPN.  While a VPN is more complex to setup, IMHO a VPN is necessary because of some vulnerabilities discovered with the older version of the protocol, which the Mac client still uses.
    The only other option would be not running OSX when connecting to the office.  Note, this does not necessarily mean getting a PC.  You could install Windows in Boot Camp.  You'd still have the problem of no actual Scroll Lock key on the Mac, but since OSX is not running, any full sized keyboard plugged into the Mac would then send the F14/Scroll Lock key correctly to the office computer.  (Or running Windows in a virtual machine, but there are limitations with that as well, although the VM is more convenient in that you don't have to boot "out of" OSX like you would with Boot Camp.)

  • "Custom Access" permissions are locking me out of my own computer!

    "Custom Access" permissions are locking me out of my own computer!
    I have a Mac Book Pro which I can no longer access, due, I believe, to a problem with disk and file permissions. When I attempt to open up the volume, which I am able to put in FireWire target mode and mount on the desktop of a nearby iMac G5, I get an error message saying: "The folder 'MacBook Pro' could not be opened because you do not have sufficient access privileges."
    When I select the 'MacBook Pro' volume and run the Get Info command, I learn that the system, admin, and everyone else groups now have "custom access." I suppose that this newly acquired "custom access" is the reason that the volume icon now appears on the desktop with a lock at its lower left corner! Unfortunately, that lock is keeping me out, so I need help in finding the key back in!
    How all this came about overnight is a mystery wrapped in a enigma similar to my getting pneumonia last summer. Coming down with both diseases would require telling long stories that would only have as their common objective the desire to be cured. I might have gotten the pneumonia at my college reunion; my laptop computer might have caught a cold last night when I ran TechTool Pro and optimized my volume prior to installing its eDrive today. Or, my laptop computer may have choked when I tried to add Disk Warrior to the TechTool Pro eDrive and inadvertently issued some command that resulted in my normal permission settings getting changed and rendering everything on the computer completely inaccessible to me. Who knows for sure? Right now, the cause doesn't matter: finding the solution does.
    I used TechTool Pro to run a series of tests before (and after) I got locked out of my own computer and the volume passed all the tests for volume integrity and file integrity. TechTool also rebuilt the directory, defragged all the files, and optimized the hard drive into one, large, well-organized segment of files --that I unfortunately can no longer access!
    *What I think I need now are some very explicit, error-free, Terminal (UNIX) instructions telling me how to change the permissions on an external FireWire volume called "MacBook Pro" containing Leopard Mac OS X 10.5.7 from its current custom access privileges back to my settings before my poor computer caught this disabling cold.*
    I do have a SuperDuper clone of this MacBook Pro computer on an external FireWire, which I could probably use to relieve me of my pain. But, if at all possible, I would like to call upon that option only as a last resort for two reasons:
    (1) I am not entirely comfortable that the clone is completely reliable at this moment. My last cloning operation last night (before this corrupted permissions problem occurred) did not complete itself, leaving the cloned volume in an unknown, or unstable, state. (2) I would like to use this problem as an opportunity to grow and learn more about the Terminal and UNIX commands.
    I have read the relevant sections in David Pogue's missing manual on Mac OS X Leopard, so I am familiar (in theory) with the concepts he explained regarding ownership, file permissions, the root, Terminal, the CHMOD command, and the SUDO command. It's just that, considering the awesome power of the SuperUser Do command, I'm not all that confident yet that I could write the command(s) that could affect the state of my entire computer hard drive. So, *I'm asking for guidance from a UNIX guru to guide my hand this first time out.*
    I know about the idea of safe booting up as a single user, but since I do have my laptop computer mounted on the desktop of my iMac as a Firewire volume, I would prefer to use Terminal on the iMac to fix the permissions on that mounted volume, called "MacBook Pro".
    *Experts only, please*. Theories about what might have caused this problem would be nice, but what I really need is explicit command line code to cure this one. Since other people may occasionally encounter this problem of being locked out of their own computer, it would be fine with me if some knowledgeable guru wants to use this as a springboard to write a detailed tutorial on the topic along the way to the solution. Thanks.
    bowlerboy_jmb

    {I read that article you sent me to, Baltwo, but it does not seem appropriate, because the disk is not invisible. It's locked! I also went through all the discussions on flag changing you directed to me to look up, and I tried to apply something from there to my situation. But that's not working for me yet either. The topics there seem to be close enough to be relevant to my case, but none are exactly on the mark, and so far they deliver no cigar. Maybe I missed the one thread you had in mind from among the twenty I looked through: I can't be sure. You point it out, if you have one in mind. Anyway, in the absence of anyone providing me with specific Unix code or suggestions about my particular situation, I plunged ahead on my own, and I attempted to write some Unix code that might fix my problem. So far, I've had no success. This posting intersperses my comments along with the lines of Unix code which were displayed on my MacBook Pro during my recent attempts to tinker under the hood. My remarks are contained inside of curly brackets like { and } while the results of my Unix experimenting in Single User Mode on the laptop are presented without curly brackets. These were initially notes to myself, so I'm creating a post around my Unix dabbling to see if it triggers any feedback, corrections, and guidance for moving ahead. I'm stuck right now.}
    date
    Fri Jun 19 17:52:25 EDT 2009
    :/ root# sudo chflags nouchg /
    sudo: can't open /private/etc/sudoers: Permission denied
    :/ root# sendmail: warning: valid_hostname: empty hostname
    sendmail: fatal: unable to use my own hostname
    :/ root# ls -l
    {The screen filled up with rows of file names and their permissions, like...}
    drwxrwxr-x+ 43 root admin 1462 Jun 16 04:36 Applications
    :/ root# exit
    {Nothing happens for quite a while, then...}
    jettisoning kernel linker.
    {...and then several lines of replies fill up the screen, ending in that same loop regarding no such file or directory found, in regards to mDNSResponder. I had tried the {chmod 775 > solution recommended by a user at a web site I Googled to deal with the mDNSResponder problem he had. The chmod 775 / command worked for him, he reported, but it does not succeed for me. The mDNSResponderline continues to repeat itself ad infinitum, so I must force the Mac to turn off by holding down the power button for several seconds. Upon restart in Single User mode, I observe that, as before, "Root device is mounted read-only," so this time I try to amend permissions at the root level with...}
    :/ root# sudo chmod 755 /
    {If I understand what I've just learned about Unix, this tells the Mac to give me permission to do anything, but to give all others permission only to read and execute. Unfortunately, the command fails. The computer again responded with the same lines that it gave me when I had issued the command regarding no user flags, namely:}
    sudo: can't open /private/etc/sudoers: Permission denied
    :/ root# sendmail: warning: valid_hostname: empty hostname
    sendmail: fatal: unable to use my own hostname
    {So, to summarize, I have a MacBook Pro which I am apparently locked out of and cannot change. The hard disk is not invisible: it will appear as an external drive when placed in Target Mode and connected via a Firewire cable to an iMac. I tried to use Terminal on that iMac to change permissions on the MacBook Pro, but permission was denied.
    {So, I have tried to make changes on the MacBook Pro directly. I learned that it will neither start-up under normal circumstances nor via Safe Boot mode. It will, however, start-up under Single User mode. Based on my bleary-eyed crash course in Unix throughout all of last night and early this morning, I did gain some additional understanding about UNIX from some [free online books|http://www.scribd.com/doc/12747795/Made-Easy-Unix-for-Beginners] and articles, especially from a thorough and lucidly written article at Indiana University called [In Unix, how do I change the permissions for a file?|http://kb.iu.edu/data/data/abdb.html]
    {Also, I followed the links to the Apple discussions on user flags, and I cherry picked the most appropriate solutions suggested there to see if they will apply to my situation. However, none quite fit. None have thus far succeeded. I think I now know how to formulate the syntax of Unix commands in regards to modifying permissions, and I'm willing to plow ahead and try things out. But I'm only a rank beginner in this Unix realm, so maybe I'm doing something wrong in that department.
    {It just boggles my mind that someone can inadvertently be locked out of their computer without a way back in, so all I'm asking for is some trouble-shooting guidance to find the key back in. Anyone got it? Is this a problem that can be cured by writing some Unix commands to the system? Or, does the solution lie elsewhere?}
    bowlerboy_jmb

  • HT5636 F14 took the lock off the "Scroll Lock" None of the suggestions above worked!!!

    The Keyboard instructions are not correct. I couldn't get the "Scroll Lock" to turn off using the instructions Apple gives. I hit F14 and that turned off "Scroll Lock". It did not "print Screen.

    What you need to do is triple-press the HOME BUTTON three times. You will be prompted to enter your passcode. This will bring up the options for guided-access mode and you will then need to click "End" in the top corner.
    Guided-access mode must have accidentally been enabled by triple-clicking the home button.

  • Unexpected Scroll Lock issues

    My T400 laptop will suddenly act as if the scroll lock is on. 
    I cannot turn off the scroll lock when I am using the laptop keyboard; in that situation I must log off and reboot. 
     I can stop the scroll lock when the laptop is docked and I am using an external keyboard.  When I disengage the scroll lock, the scroll lock light turns on and operates backwards until the laptop is rebooted.
    Please advise if this problem has a fix.  (One of my co-workers also experienced this on the same model laptop.)

    I got this problem on excel running under Parallels
    Finally got it, I hope it helps:
    Or, if you're working on Windows on a mac via bootcamp or virtualization software (Fusion or Parallels), you can either do:
    fnaltF12
    Or go to:
    Start->All Programs->Accessories->Accessibility->On-Screen Keyboard

  • How do I turn scroll lock off

    how do I turn the scroll lock off on my ipod touch

    It sounds like y have an Accessibilty feature turned on. To check and correct go to: Settings>General>Accessibilty.  If you can't get there on the iPod, connect the iPod to your computer and go to the Summary screen for the iPod in iTunes and click on Configure Universal Access and check/correct the accessbility features.

  • Scroll Lock

    I seem to have Scroll Lock on, and cant work out how to turn it off.
    Running MS Excell 2004, a green light is on next to SCRL at the bottom of the page, and the arrow keys scroll the screen instead of moving between cells. On a PC (sorry, recent convert from the darkside), there's a Scroll Lock key on the keyboard which toggles this on and off. How do i do it on my Mac Book?

    I got this problem on excel running under Parallels
    Finally got it, I hope it helps:
    Or, if you're working on Windows on a mac via bootcamp or virtualization software (Fusion or Parallels), you can either do:
    fnaltF12
    Or go to:
    Start->All Programs->Accessories->Accessibility->On-Screen Keyboard

  • Reading the scroll lock key

    How could I make LabVIEW read the status of the scroll lock key (on or off)?

    Using an event structure will only tell you if you pressed the scroll lock key, it will not tell you the current state of the scroll lock LED on your keyboard. For that you need to call user32.dll. The function is: unsigned char GetKeyState(long nVirtKey). I use this to get the state of the caps lock key, for which I pass this function 20. I'm not sure what the value of scroll lock is.
    I've attached my caps lock key VI so you can see how to do it.
    Edit: beaten to the punch.
    Message Edited by Marc A on 03-14-2007 11:25 AM
    Attachments:
    Caps Lock State.vi ‏8 KB

  • X220 - swapping numlock and scroll lock

    Hello,
    does anybody know, how to swap these both keys? I've searched the registry, but I haven't found anything... Ideal state would be just change the values - in a result numlock would be turned on by pressing "scrlk" key, and scroll lock would be turned on by "fn+scrlk". Num lock would help me a lot, since I don't use Excel very often.
    I would be very glad for all suggestions!
    Thank You and wish a nice day!
    Skrble

    Try KeyTweak.
    I can't confirm Fn+keys combinations remapping capability.
    x220 | i5-2520m | Intel ssd 320 series | Gobi 2000 3G GPS | WiFi
    x220 | i5-2520m | hdd 320 | Intel msata ssd 310 series | 3G GPS | WiFi
    Do it well, worse becomes itself
    Русскоязычное Сообщество   English Community   Deutsche Community   Comunidad en Español

  • Scroll Lock key missing on a W540

    Well, we do have many things missing on this Workstation (see other comments), but here is the latest discovery.
    All last week I needed to do some cross referencing of Excel worksheets and Access databases.  I use "Synkronizer", and excellent Excel comparator who's author fears piracy and links the application to the machine and checks EVERY USE!.  So I'm not at liberty to move the application easily.
     When needed I export an Access table to Excel, and compare, merge, etc, then reimport into Access or work in Excel....  Long story. BUT the issue.  ^K (Ctrl-K)  which is the cryptic Scrl-Lock key on this so called workstation with 4 dumb wasted keys in the upper right hand, does not work within two Excel sheets.
    The work around is within Excel, using [Syncronized Scrolling], and [View Side by Side]. BUT now it forces an horizontal scroll, when a vertical would be desireable. What a pain!
    After I got back, I tested the same thing on my desktop, WITH A REAL SCROLL LOCK KEY, and it worked correctly.
    If there was a REAL scroll-Lock key on the W540, this would not be an issue.
    What is the point?
    The W540 is NOT a Workstation. If you do not program, work in Excel or Access, then this is a moot point.  The W540 is a dumb terminal for cloud applications, surfing, eMail, watching YouTubes and videos.
    For this one, there is really NO workaround.
    Am I wrong?  Has someone tested the multiple windows scrolling on Excel, and locked from the keyboard two sheets?  I also discovered a similar issue when comparing two ASCII files in my editor.

    Yes, I noticed this as well. The workaround I have is, go to Windows and search for "On Screen". You will get to the On Screen Keyboard where you can toggle the Scroll Lock.

  • How do I turn off the Camera access from the lock screen

    how do I turn off the Camera access from the lock screen ?

    Only by hiding the camera via Restrictions. Settings>General>Restrictions. That hides the camera when unlocked unless you go to Restrictions  and unset that Restriction. That is not way currently from just preventing camera access only from the lock screen

  • Can't turn off scroll lock Mac Book Pro Excel

    Suddenly cannot move through cells or enter data in Excel for MAC. Have read all of the discussions on this topic - shift+fn+f12 don't work or any of the other suggested combinations, I have no F14 key or external keyboard, set up keyboard preferences to run fn keys, and there is no scroll lock or keyboard icon in the excel window - nothing works. I somehow turned this on, probably via a keystroke, so I must be able to turn it off - how? I appreciate your help - thank you!

    Problem solved. When naming the droplet in the where to save dialog, make you you put a .app at the end of it.
    Now works perfect.
    M'c Book Pro 2.0, 2GB, 100GB 7200, iMac G5, 2GB, 250GB   Mac OS X (10.4.6)   2TB external storage

  • VMs on Failover Cluster hanging in "Locked" state

    I'm managing a Windows Server 2012 R2 2-node cluster that is backed up using a separate DPM 2012 R2 server. All VMs are on Cluster Shared Storage.
    I've noticed that some VMs keep hanging in a "Running (Locked)" state (in FOCM, in HVM it shows a "Backing up..." state). Things I noticed while the VMs are in this state are:
    every subsequent DPM backup will fail (it looks like DPM is the cause of this "Locked" state)
    the VM can't be moved to another node
    if the VM is backed up "Online", I can see AVHD files -- the VHD files have the date of the last succesful DPM backup
    if the VM is backed up "Offline", I can't find any snapshots (the VHD files have the date of the last succesful DPM backup, which is weird, since the data in the VM is actually changing)
    The only way out of this situation is to shut down the VMs and reboot both cluster nodes. Of course, this isn't something that I like to do on a weekly basis.
    My questions:
    - What can I do to prevent this "Locked" problem? (the last 2 months I've experienced this problem with 5 different VMs)
    - Is there another way to get out of the "Locked" situation? Preferably one that doesn't require a cluster reboot.
    - Are there any logs I can check to get more information about this problem?
    Thanks in advance!

    I don't have a couple of those hotfixes. Mainly because the hotfix page states that I only should install it if I experience the problems mentioned -- which isn't always the case.
    I have a service interval coming up and will install the relevant patches. I'll report back when I have new information.
    Thanks so far!

  • No Access Error with Locked User iView

    Hi
    We are running EP6SP2 Patch 35
    I’m trying to give access to the Locked User iView to a group of users (I don’t want them to have full User Management functionality)
    I’ve created a role and added Locked User iView to it.  The role has the same property values as the standard User Admin role (eg UME Action ID: UME.Manage_All = Yes), but when I try to access the Locked User iView I get:
    No Access
    You have no permission to perform this action.
    Can anybody advise what else I need to do to get this to work?
    Thanks.

    Hi Mike,
    just to make sure: did you restart the server after assigning the UME Action to the role???
    Unfortunately, this has to be done in order for your changes to take effect.
    Best regards,
    Robert

Maybe you are looking for

  • I can't update my iPhone 4 to the iOS 4.3.3 software.

    I am running windows 7 Home Premium Edition and just updated iTunes to the latest version. While downloading the iOS 4.3.3 software update the status bar fills completely, then while processing file it stops and I get an error message saying "The sof

  • How can I read different files in the file adapter

    Hi, I have a scenario like file(content conversion and FTP) to Proxy and need to read 2 files which have different structures. The file structures is as follows. FileA.txt EMPID, Designtion,code,DOB,dept,deptID and 13 fields etc.. FileB.txt officerco

  • IDOC ORDERS05 - need to know how to send IDOC using EAN

    Dear Expert, in my site i have scenario to convert PO for 1 system to SO on other system. Now my configuration is send IDOC using vendor material. But I need to change for send with EAN code, and it can create my IDOC to SO (using EAN code) How can i

  • How to assign attribute values to a range of BPs ????

    Hi All,      While assigning attribute values to business partners we can specify at the most one business partner at a time. My requirement is to assign attribute values to a range of business partners at a time. Is there any customization setting w

  • Fehlendes Radialfilterikon in Camera Raw 8.3. in CS6

    Mein Camera RAW in CS6 zeigt das Icon Radialfilter nicht an, obwohl die Version lt. Adobe die aktuelle ist. Bei einem Kollegen wird sie sehr wohl angezeigt. Warum? Danke für Hilfe. Hedschi