Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a method for disabling gestures for Windows8

Tags:

windows

kiosk

We have a need in one of our apps where we need to disable some of the built in gestures for Windows 8 to prevent users from leaving the app. (think kiosk sign in screen). Are there methods for still allowing the user to interact with the app using touch but disabling/intercepting some of the built in gestures (things like docking the app on the left, going to the desktop, etc).

Our backup solution is to disable touch altogether when in certain screens (this is something we can do) but we'd like a better user experience and to just disable the gestures that we absolutely need to (similar to disabling the windows key, ctrl+alt+del instead of the whole keyboard).

Initial searches and investigation haven't turned up what we've been looking for so we're either looking for the wrong thing or in the wrong places.

like image 975
George Clingerman Avatar asked Sep 13 '12 22:09

George Clingerman


People also ask

How do I turn off Windows gestures?

If you'd like to disable two-finger gestures, uncheck “Drag two fingers to scroll” and “Pinch to Zoom.” After that, click the “Three-Finger Gestures” header to expand the menu. Click the drop-down menu beside “Swipes” and select “Nothing.” Do the same with the “Taps” drop-down menu.

How do I turn on gestures in Windows 8?

Look for a tab called "Device Settings" or "Advanced." You might have to click a "Settings" or "Advanced feature settings" on this tab. Here you should find a variety of options and settings for using your touchpad. CLICK HERE for information about gesture control (finger swipe) settings.

How do I change Windows gestures?

Change your touch gestures To change the default touch gestures on your Windows 11 PC, select Start > Settings > Bluetooth & devices >Touchpad. Select Three-finger gestures or Four-finger gestures to change what your swipe gestures do.


2 Answers

You can disable gesture in Windows 8 Embedded. Maybe you can try this in Windows 8.

Registry Keys:

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\ImmersiveShell\EdgeUI]
"DisabledEdges"=dword:0000000f

0x01 : Disables left edge input and app switcher gesture.
0x02 : Disables right edge input and charm bar gesture.
0x04 : Disables top edge input and top application bar gesture.
0x08 : Disables bottom edge input and bottom application bar gesture.

if you want to disables each gesture, just add dword:0000000f (15)

like image 160
Quentin V Avatar answered Sep 20 '22 12:09

Quentin V


To do it programmatically, you can call the function in the link below. It requires the hWnd to the window you would like to target.

http://msdn.microsoft.com/en-us/library/windows/desktop/jj553591%28v=vs.85%29.aspx

The C++ below will search for a window with the window title "helloworld", and disable all of the Windows 8 gestures for it. This does not work for Windows Store apps, and the function has to be called on the window while it is open. If the application is closed and re-opened, the gestures will return. Also, I believe it only works while the application is full-screen.

#include "stdafx.h"
#include <windows.h>
#include <iostream>
#include <propsys.h>
#include <propkey.h>

using namespace std;

HWND windowHandle;

HRESULT SetTouchDisableProperty(HWND hwnd, BOOL fDisableTouch)
{
    IPropertyStore* pPropStore;
    HRESULT hrReturnValue = SHGetPropertyStoreForWindow(hwnd, IID_PPV_ARGS(&pPropStore));
    if (SUCCEEDED(hrReturnValue))
    {
        PROPVARIANT var;
        var.vt = VT_BOOL;
        var.boolVal = fDisableTouch ? VARIANT_TRUE : VARIANT_FALSE;
        hrReturnValue = pPropStore->SetValue(PKEY_EdgeGesture_DisableTouchWhenFullscreen, var);
        pPropStore->Release();
    }
    return hrReturnValue;
}

BOOL CALLBACK MyEnumProc(HWND hWnd, LPARAM lParam)
{
    TCHAR title[500];
    ZeroMemory(title, sizeof(title));    

    GetWindowText(hWnd, title, sizeof(title)/sizeof(title[0]));

    if (!_tcscmp(title, _T("helloworld")))
    {
        SetTouchDisableProperty(hWnd,true);
    }

    return TRUE;
}

int _tmain(int argc, _TCHAR* argv[])
{   
    EnumWindows(MyEnumProc, 0);
    return 0;
}
like image 28
Aaron Avatar answered Sep 18 '22 12:09

Aaron