Tips and tweaks for slate button actions and touch gestures

Discussion in 'Samsung' started by Deathdemon, Jan 8, 2012.

  1. Deathdemon

    Deathdemon Pen Pal - Newbie

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    6
    Hi everyone,
    I want to share my experience in tweaking slate controls. Some of these tips may be known to experienced users, but there's also some new info and possibilities for gesture configuration in the second part of the post, looks like it's not mentioned anywhere on the internet yet.
    Gesture and button action configuration depends much on user tastes and tasks performed on the slate, so I've tried to include sufficient amount of general info, to make sure everyone can change examples from this post according to their preferences.

    1. Buttons
    You can remap slate buttons to other keys using KeyTweak app in half-teach mode.
    For example, I don't use Touch Launcher and rotation lock, so I've remapped Rotation Lock button to Enter key, and single press of the Windows button to Esc. - This way these buttons are much more useful to me.

    If you plan to remap Windows button, it's necessary either to uninstall Touch Launcher or to disable its tasks in Task Scheduler: Control Panel -> Administrative Tools -> Task Scheduler, select Task Scheduler Library on the left, then find LauncherStarter and LauncherStarter2 tasks in the list, end and disable them both. This way allows you keep Touch Launcher installed (you can access it using Start menu when necessary) and at the same time it prevents Touch Launcher from interfering with the remapped Windows button functions.

    Here's a link to another possible configuration, a post by g2tl with an instruction how to remap Windows button to toggle touch and power off display: http://forum.tabletpcreview.com/sam...ws-button-toggle-touch-power-off-display.html
    Using KeyTweak together with AutoHotKey you can actually make slate buttons launch any application you want, the link above is an example.

    2. Touch gestures
    On a multitouch display there's a large potential for various touch gestures, and it's a pity that this potential wasn't uncovered completely with some built-in configuration utility.
    There are actually two different places to configure touch gestures:

    2.1 Single-touch gestures configuration
    You can configure single-touch gestures in Control Panel -> Pen and Touch -> Flicks tab.
    Flicks have built-in possibility to emulate user-defined key combinations, but they don't allow launching programs, except using some workarounds like third-party software (AutoHotKey and others) to intercept key presses.
    Flicks allow to define up to 8 different gestures (left, right, up, down and diagonals), but if you find its default "Navigational and editing flicks" configuration useful, there's no more place for additional commands.
    The only thing I've changed here on my slate, comparing to the default Navigational and Editing Flicks configuration, is replacing Delete flick with Backspace (using "(add)" in the dropdown list), - it's more convenient to fix typos this way when entering text.

    2.2 Multitouch gestures configuration - technical info
    Multitouch gestures are handled by InputSupporterNLauncher.exe application, and it has no convenient configuration editor, you'll have to edit its ini file in a notepad to change its settings. Basics were described already by Jesse B Andersen here: Jesse B Andersen: Samsung Series 7 Slate - Modify & Add Multi-Touch Gestures
    ini file location: C:\Program Files (x86)\Samsung\Touch Supporter\InputSupporter.ini

    Input Supporter has two types of gestures:
    • Two finger press and drag up, down, left or right (MoveUp, MoveDown, MoveLeft, MoveRight sections in the ini file);
    • Tapping with 3-8 fingers (Point3 - Point8 sections in the ini file).

    For some reason Point6-Point8 weren't working on my system (well, I don't need them much anyway).

    Parameters for gesture sections
    I believe it's a full list of them for the current version 1.2.0.10 of InputSupporterNLauncher.exe. Got them from the exe file itself.
    • Enabled - Set this to 1 to enable the gesture, 0 to disable.
    • Command - Path to exe file to launch when user performs a gesture.
    • Param - Command line parameters for the exe file.
    • PreConditionOpt - Seems that the only supported value for this parameter currently is ProcessCheck, which specifies that Input Supporter should check if a process with name from PreConditionValue is running. Input Supporter launches Command with Param if the process is running, or CommandAlt with ParamAlt if the process is not running.
    • PreConditionValue - Meaning and contents of this value is supposed to be different depending on PreConditionOpt - see above.
    • CommandAlt - Command to launch when PreConditionOpt is set to ProcessCheck and the process specified in PreConditionValue is not running.
    • ParamAlt - Command line parameters for CommandAlt.
    • UsePosParam - Set this to 1 to make Input Supporter prepend coordinates of the touch to Param as additional parameters for the command (format is "/x:123 /y:456"). In the current version of Input Supporter it works in Point3 section only, and it doesn't work for ParamAlt. Looks like Samsung developers didn't bother too much with this, they simply made their TouchSupporter app window appear at the position where user has tapped and didn't intend to use this parameter for anything else.
    • Privilege - Some unknown parameter. Its default value is "Normal". I've tried setting various other values and I didn't find if it affects something at all.

    ..And there's no built-in possibility to simulate keypresses.
    So I've decided to fix this fault and wrote a simple program called ConsoleKeySim which allows simulating keypresses depending on which application is currently active. Probably it was possible to do it using some existing application, but I didn't find any existing application which loads sufficiently fast and doesn't show any windows or icons which flicker each time a gesture is performed.

    3. Simulating keypresses using ConsoleKeySim.exe - technical info
    Each time user performs a gesture, InputSupporterNLauncher loads ConsoleKeySim with parameters which specify key combinations to simulate, ConsoleKeySim checks which application is active, simulates appropriate key combination depending on this, and then exits. The program is really small (just 6 KB), so this works instantly without any visible delay.
    If you want to use it, you can download it here: http://deathdemon.int.ru/projects/consolekeysim.exe
    And here are its sources, just in case someone wants to improve it: http://deathdemon.int.ru/projects/consolekeysim_src.zip (written in C++, distributed under GNU GPL).

    The application does not require installation, just copy it somewhere (I've put it directly to C:\Program Files (x86)\, so my ini example uses this path).
    Launch the application without parameters to see detailed explanation of its parameters syntax. Basically, you can simulate any key combinations or text sequences, plus a possibility to insert a delay between keys, where necessary.
    The first parameter is the default key sequence if the active application does not match with any of the apps specified in the following parameters. The following parameters always go in pairs: window title mask (or application name mask if prepended by ~) and key sequence for this application.

    In a simple case, key sequence usually consists of an optional key modifier and a virtual-key code.
    Key modifiers: + is Shift, ^ is Ctrl, ! is Alt, and # is Windows key.
    Virtual-key code is a code which identifies a key on the keyboard. You can find full list of virtual-key codes here: Virtual-Key Codes (don't put 0x before codes in parameters - it's unnecessary).
    For example, if you check the link above, you'll see that F4 key has code 0x73, so you'll need to specify "!73" as a parameter to simulate Alt+F4.

    4. Simulating keypresses and admin privileges
    Note that simulating keypresses using ConsoleKeySim won't work in programs which have admin privileges, unless ConsoleKeySim runs with admin privileges itself. This is the way it works in Windows for security reasons. It does not seem like a major issue to me, since most programs usually don't have admin privileges.

    If you really want it, you can overcome this by making InputSupporterNLauncher run with admin privileges (keep in mind though, that every program it starts will run under admin privileges too): Go to Control Panel -> Administrative Tools -> Task Scheduler, select Task Scheduler Library on the left, then double-click on InputSupporterNLauncher in the list, enable "Run with highest privileges" checkbox at the bottom of General tab, then click Ok and reboot the slate or end InputSupporterNLauncher task and restart it again to make the change go into effect.

    5. Multitouch gestures and simulating keypresses using ConsoleKeySim.exe - working example of InputSupporter.ini
    Here is my InputSupporter.ini:
    Code:
    [Common]
    HoldTime=50
    MaxTime=500
    MinVectDistance=60
    
    [Point3]
    Enabled=1
    Command="TouchSupporter.exe"
    UsePosParam=1
    
    [Point4]
    Enabled=1
    PreConditionOpt=ProcessCheck
    PreConditionValue=swype.exe
    Command="%CSIDL_PROGRAM_FILES%\Swype Inc\Swype Windows 7 Keyboard\Swype.exe"
    CommandAlt="%CSIDL_PROGRAM_FILESX64%\Common Files\microsoft shared\ink\Tabtip.exe"
    
    [Point5]
    Enabled=1
    Command="%CSIDL_PROGRAM_FILES%\ConsoleKeySim.exe"
    Param="b3"
    ; Play/pause
    
    [MoveUp]
    Enabled=1
    Command="%CSIDL_PROGRAM_FILES%\ConsoleKeySim.exe"
    Param="!20.'n'"
    ; Minimize window: Alt+Space, then 100ms delay to let the menu open, then N to choose Minimize menu item.
    
    [MoveDown]
    Enabled=1
    Command="%CSIDL_PROGRAM_FILES%\ConsoleKeySim.exe"
    Param="!73 ~chrome.exe ^73 ~iexplore.exe ^73"
    ; Close window (Alt+F4), or close current tab (Ctrl+F4) in Chrome / IE
    
    [MoveLeft]
    Enabled=1
    Command="%CSIDL_PROGRAM_FILES%\ConsoleKeySim.exe"
    Param="- ~chrome.exe ^74 ~iexplore.exe ^74 ~firefox.exe ^74 ~opera.exe ^74"
    ; Refresh page (Ctrl+F5) in browsers, do nothing in other applications
    
    [MoveRight]
    Enabled=1
    Command="%CSIDL_PROGRAM_FILES%\ConsoleKeySim.exe"
    Param="0d"
    ; Enter
    
    You can actually use it as is, just backup your previous ini file for safety, and copy ConsoleKeySim.exe to C:\Program Files (x86)\
    You'll need to reboot the slate to make your changes to InputSupporter.ini go into effect. As a faster alternative, you can kill InputSupporterNLauncher process and restart the process again.

    I've left 3-finger and 4-finger touch actions as is (3-finger touch opens Touch Supporter and 4-finger touch opens an on-screen keyboard).
    Here are the new functions:
    • 5-finger touch simulates Play/pause media key.
    • Two-finger drag up minimizes active window. It simulates Alt+Space and then N for "Minimize". I didn't check how this works on Windows with localizations other than English, - I guess menus can use different keyboard shortcuts in different localizations, so if that's the case for you, find the line with "!20.'n'" combination and replace n with character used in your Alt+Space menu for Minimize item.
    • Two-finger drag left refreshes page in browsers.
    • Two-finger drag right simulates Enter key.
    • Two-finger drag down closes active window or current tab in Chrome or Internet Explorer. Actually, I find it really convenient to close windows and tabs with a touch gesture, and I start to miss this possibility on my desktop PC after getting used to it on the slate.

    That's all for now.
    Feel free to ask if you have any questions regarding this post.

    ConsoleKeySim changelog:
    Jan 11: Removed msvcr100.dll dependency - should work now on systems where this dll isn't installed.
     
    Last edited by a moderator: May 18, 2015
  2. Steve S

    Steve S Pen Pro - Senior Member Super Moderator

    Messages:
    5,901
    Likes Received:
    1,708
    Trophy Points:
    331
    Death: Very impressive...
     
  3. krfighter

    krfighter Scribbler - Standard Member

    Messages:
    102
    Likes Received:
    0
    Trophy Points:
    31
    very impressive and very useful!
    Thanks!
     
  4. patach

    patach Pen Pal - Newbie

    Messages:
    26
    Likes Received:
    0
    Trophy Points:
    5
    Is this working on the Samsung Slate 7?

    I would love to use photoshop to sketch on a Slate 7, but use my other hand to trigger "undo" (CTRL+Z), zooms, and other things using the hotkeys. Would this be applicable for something like that?

    I'm also a little worried that the multitouch will get confused if I rest my hand on the tablet while holding the stylus. Has there been any reported confusion with it thus far?
     
  5. Deathdemon

    Deathdemon Pen Pal - Newbie

    Messages:
    12
    Likes Received:
    0
    Trophy Points:
    6
  6. yumcimil

    yumcimil Pen Pal - Newbie

    Messages:
    2
    Likes Received:
    0
    Trophy Points:
    5
    Thanks for all your work - I have a slightly weird issue. I have an application that's currently designed to use a mouse with a scrollwheel - so navigating through sets of images is accomplished with mousewheel down, often hundreds at a time.

    Is it possible to emulate a freely spinning scrollwheel with either flicks or your program? Ideally, similar to the two-finger scroll that you get in OSX.
     
  7. mspanish

    mspanish Pen Pal - Newbie

    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    5
    Thank you so much for this work! I've used some of it as the basis for a project I started called devDock, to make a dock for programmers and other people doing dev work as well as graphic. I haven't put the project page on my website yet, but the project and files are on GitHub here:

    https://github.com/mspanish/devDock

    devDock

    thanks again for all the help you've given with your great post!

    warm wishes from Alaska
    Stacey
     
    Last edited by a moderator: May 18, 2015
Loading...
Similar Threads - Tips tweaks slate
  1. Akvod
    Replies:
    3
    Views:
    770

Share This Page