Remapping "Home" button to switch touchscreen off/on

Discussion in 'EP121 Slate' started by mst, Jul 20, 2011.

  1. mst

    mst Pen Pal - Newbie

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    6
    I've acquired the EP121 four weeks ago and it's going great!

    However, I have found that when I try to use the pen, my palm tends to cause quite a bit of trouble so I have to switch the touch input off. But when I'm not trying to use the pen, it's obviously useful to have the touch input on. Having to go into Control Panel to change this everything was becoming a pain very quickly.

    Since I never use the Flip3D feature, I thought I should remap the "Home" button so that I can switch the touchscreen off/on in one button press. Unfortunately, as far as I'm concerned, no existing solution seem to exist.

    I have managed to write a lightweight program to achieve exactly this. Since I've found this forum very helpful so far I thought I should share this on here just in case someone finds it useful as well.

    ToggleTouch
    When this program is running, the "Home" button on the tablet is reprogrammed to toggle the touch input state. I've tried to make the program as small and lightweight as possible, and it just sits quietly in the background. As far as I've tested, it uses very little CPU time and memory and shouldn't have a major impact on battery life.

    Just download the zip, put ToggleTouch.exe wherever you find convenient, and run it. There's no dialog box/window/taskbar icon, just press the home button to see if it works. If you want to quit the program, run ToggleTouch.exe -exit or kill the process in Task Manager.

    If you reboot your computer the program will NOT be loaded automatically. If you want it to run on startup, you can find good instructions on Google.

    This is a free software under the terms of GPLv3.

    Download link: http://hydrogen.saran.in.th/ep121/toggletouch/bin.zip

    UPDATE: [23/7/11] ToggleTouch now works properly when Aero Glass is turned off.

    Source code is available at http://hydrogen.saran.in.th/ep121/toggletouch/src.zip

    Disclaimer
    The program uses a low-level keyboard hook to achieve its trick. I have tested it myself and it seems to work, but I accept no responsibility whatsoever if your system stops responding to key presses/sets on fire and explodes/murders you. If in any doubt, check out the source code and compile it yourself.
     
    Last edited by a moderator: May 18, 2015
  2. Ralph-G

    Ralph-G Pen Pal - Newbie

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    5
    Thanks mst.
    I have downloaded the bin file and will try it out later.
     
  3. aussiedeza

    aussiedeza Scribbler - Standard Member

    Messages:
    144
    Likes Received:
    0
    Trophy Points:
    31
    Cool does that mean we could remap the button to do other things like act as a shift key?
     
  4. mst

    mst Pen Pal - Newbie

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    6
    In principle, yes. All the "home" button does is sending the sequence LCtrl+LWin+Tab to Windows, so any program which intercepts this sequence can trap it before it reaches the DWM (the process that does Flip3D).

    If you just want to remap it to Shift there are programs out there that will do that for you already. This thread is a good start: http://forum.tabletpcreview.com/ep121-slate/40827-reassigning-ep121-buttons.html
     
  5. kamikaze458

    kamikaze458 Scribbler - Standard Member

    Messages:
    455
    Likes Received:
    0
    Trophy Points:
    31
    may i ask... another default function of the "home button" is acting as a "ctrl alt del" when you keep it pressed.

    Does this feature remains?
     
  6. mst

    mst Pen Pal - Newbie

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    6
    Yes.

    The behaviour of the home button is primarily controlled by Asus's hotkey service, that is to say if the service detects a "short" press it fires LCTRL+LWIN+TAB to trigger Flip3D, while a "long" press causes it to fire CTRL+ALT+DEL.

    ToggleTouch.exe only traps and overrides LCTRL+LWIN+TAB and doesn't touch CTRL+ALT+DEL. In fact, NOTHING can touch a CTRL+ALT+DEL signal once it's been fired, so the only way to reprogram the long press behaviour is to flash Asus's driver.
     
  7. greatthursday

    greatthursday Pen Pal - Newbie

    Messages:
    27
    Likes Received:
    0
    Trophy Points:
    5
    Thanks so much for developing this.

    However, I get an error when I try to run the program:

    "This program can't start because MSVCR100.dll is missing from your computer. Try reinstalling the program to fix this problem."

    Call me silly but I don't think I'm missing anything ... hmmm!

    Edit, figured it out. Stupidly removed the C++ packages. D'oh. Call me stupid this time. THANKS! :)
     
  8. kamikaze458

    kamikaze458 Scribbler - Standard Member

    Messages:
    455
    Likes Received:
    0
    Trophy Points:
    31
    thank you very much, i'll try it!

    sorry, i downloaded it and it says that a file is missing: msvcr100.dll

    what should i install? visualstudio?

    thanks again
     
  9. mst

    mst Pen Pal - Newbie

    Messages:
    17
    Likes Received:
    0
    Trophy Points:
    6

    Since a few people might have tried to save space by uninstalling the C++ redists, I've rebuilt the program with the MSVCR100.dll dependency built-in (statically linked).

    In other words, the NEW binary that's available for download right now should NOT require MSVCR100.dll anymore :) (The exe is now ~45KB bigger)
     
  10. dbrn

    dbrn Scribbler - Standard Member

    Messages:
    447
    Likes Received:
    144
    Trophy Points:
    56
    Works great for me on first try. Awesome tweak MST, thanks!
     

Share This Page