Map A1 button on CF-20 and CF-33 to perform soft dismount from keyboard base

By | November 28, 2018
Share

This sniplet was written to work within a Powershell app deploy toolkit package.  If you are not familiar with that toolkit, get familiar with it, its a huge time saver.

## <Perform Installation tasks here>
Execute-Process -Path "$envSystem32Directory\reg.exe" -Parameters ('load HKLM\ImportedHive "{0}\Users\Default\NTUSER.dat"' -f $envSystemDrive)
$bClickDefAction = [byte[]](0x25,0x00,0x53,0x00,0x79,0x00,0x73,0x00,0x74,0x00,0x65,0x00,0x6d,0x00,0x52,0x00,0x6f,0x00,0x6f,0x00,0x74,0x00,0x25,0x00,0x5c,0x00,0x53,0x00,0x79,0x00,0x73,0x00,0x74,0x00,0x65,0x00,0x6d,0x00,0x33,0x00,0x32,0x00,0x5c,0x00,0x72,0x00,0x75,0x00,0x6e,0x00,0x64,0x00,0x6c,0x00,0x6c,0x00,0x33,0x00,0x32,0x00,0x2e,0x00,0x65,0x00,0x78,0x00,0x65,0x00,0x00,0x00,0x63,0x00,0x66,0x00,0x67,0x00,0x6d,0x00,0x67,0x00,0x72,0x00,0x33,0x00,0x32,0x00,0x2e,0x00,0x64,0x00,0x6c,0x00,0x6c,0x00,0x2c,0x00,0x43,0x00,0x4d,0x00,0x5f,0x00,0x52,0x00,0x65,0x00,0x71,0x00,0x75,0x00,0x65,0x00,0x73,0x00,0x74,0x00,0x5f,0x00,0x45,0x00,0x6a,0x00,0x65,0x00,0x63,0x00,0x74,0x00,0x5f,0x00,0x50,0x00,0x43,0x00,0x00,0x00)

Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2' -Name 'ButtonID' -Type 'Dword' -Value '2'
Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2\PrimaryLandscape' -Name 'DefAction' -Type 'Dword' -Value '2147483648'
Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2\PrimaryLandscape' -Name 'DefActionData' -Type 'Binary' -Value $bClickDefAction
Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2\PrimaryPortrait' -Name 'DefAction' -Type 'Dword' -Value '2147483648'
Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2\PrimaryPortrait' -Name 'DefActionData' -Type 'Binary' -Value $bClickDefAction
Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2\SecondaryLandscape' -Name 'DefAction' -Type 'Dword' -Value '2147483648'
Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2\SecondaryLandscape' -Name 'DefActionData' -Type 'Binary' -Value $bClickDefAction
Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2\SecondaryPortrait' -Name 'DefAction' -Type 'Dword' -Value '2147483648'
Set-RegistryKey -Key 'HKEY_LOCAL_MACHINE\ImportedHive\Control Panel\TabletPC\ButtonMaps\2\SecondaryPortrait' -Name 'DefActionData' -Type 'Binary' -Value $bClickDefAction

Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2' -Name 'ButtonID' -Type 'Dword' -Value '2'
Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2\PrimaryLandscape' -Name 'DefAction' -Type 'Dword' -Value '2147483648'
Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2\PrimaryLandscape' -Name 'DefActionData' -Type 'Binary' -Value $bClickDefAction
Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2\PrimaryPortrait' -Name 'DefAction' -Type 'Dword' -Value '2147483648'
Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2\PrimaryPortrait' -Name 'DefActionData' -Type 'Binary' -Value $bClickDefAction
Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2\SecondaryLandscape' -Name 'DefAction' -Type 'Dword' -Value '2147483648'
Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2\SecondaryLandscape' -Name 'DefActionData' -Type 'Binary' -Value $bClickDefAction
Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2\SecondaryPortrait' -Name 'DefAction' -Type 'Dword' -Value '2147483648'
Set-RegistryKey -Key 'HKEY_CURRENT_USER\Control Panel\TabletPC\ButtonMaps\2\SecondaryPortrait' -Name 'DefActionData' -Type 'Binary' -Value $bClickDefAction

Execute-Process -Path "$envSystem32Directory\reg.exe" -Parameters 'unload HKLM\ImportedHive'

 

2 thoughts on “Map A1 button on CF-20 and CF-33 to perform soft dismount from keyboard base

  1. Tim Bellomo

    What would I need to change to map to A2 (since our A1 is hard-mapped to the barcode scanner)?

    Thanks!

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *

*

This site uses Akismet to reduce spam. Learn how your comment data is processed.