Search the Legacy Support Archive (up to v2020)
  1. Read-only archive (2005–2024). Posting is closed. Need help with MediaLab or DirectRT 2027? Email service@empirisoft.com.

    All words · “exact phrase” · -leave out

    Advanced search

Disabling the Escape and Windows keys?

  1. #1
    jarvis24 Blair Jarvis, Administrator

    Disabling the Escape and Windows keys?

    [edited from support email]
    If a subject presses the escape (Esc) or Windows app key accidently when I run them in my experiment, we lose data because we can not re-run them. Do you know of a way to "freeze" those keys so that the program does not automatically end? OR is there a way, if that happens, to start where they left off?

  2. #2
    jarvis24 Blair Jarvis, Administrator
    Currently there is not a way to disable the Escape key. It's intended to be a reliable way out of a session in case you need to end it early or forget what the valid responses are at a given time. If the Esc key is pressed, then all of the data up to that point are still saved to the data file. So, yes, you could start again where the session left off but it would be a bit of a pain. You would need to look at the data file to see what trial they got to and then enter the remaining range when re-starting the session. For example, if the subject reached trial 50, then you could enter "51-200" in the range field when re-starting the session. The pain is that you would need to rename or move the data from the initial trials so that they would not be overwritten. You would also be able to do this only in cases where independent trial randomization would not be an issue.

    As I'm writing this, it seems a simple solution would be to add a "use protected escape" option. If selected then you would need to also press the control and shift keys at the same time or it would not work. I'll add that to the to-do list for the next version.

    As for the Windows app key, that typically does not end the session. In some cases though, it may minimize the session window. If that happens, you can usually alt+tab back to it to resume where you left off.

  3. #3
    jarvis24 Blair Jarvis, Administrator
    I found what seems to be a simple modification you can make to the Windows registry that will disable the Windows keys. Take a look at the attached readme.txt file for details on how to do it. The zip file includes instructions and .reg files for both disabling and re-enabling these keys.

    Note that I've only tested this on one machine so far--so if anyone runs into any trouble with this please let us know.

  4. #4
    [edited by moderator]

    Use the following Reg-Key to disable:
    ESC, Left-Win-Key, Right-Win-Key, Application-Key

    On the entire machine:
    [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
    "Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,00,00,5B,E0,00,00,5C,E0,00,00,5D,E0,00,00,01,00,00,00,00,00
    Per user:
    [HKEY_CURRENT_USER\Keyboard Layout]
    "Scancode Map"=hex:00,00,00,00,00,00,00,00,05,00,00,00,00,00,5B,E0,00,00,5C,E0,00,00,5D,E0,00,00,01,00,00,00,00,00
    Windows Registry Editor Version 5.00

  5. #5