Swap ctrl and caps lock windows

In Windows 8 I used to remap my capslock key to control using the registry script REGEDIT4 [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout] "Scancode Map"=hex:00,00,...

I put together a cmd batch file, install-keyboard.bat (latest version in https://gitlab.com/0mid/dotfiles/-/blob/master/install-keyboard.bat), to map the CapsLock and the right «Windows key» both to Left Ctrl (LCtrl).

Hopefully, the variable names for the key codes and clarifying comments (incorporating those from @mnemotronic here and the ‘official’ docs, in addition to mine) make this script useful for (and extensible by) others who are forced to use this proprietary operating system (Windows).

This batch file needs to be run in an Admin cmd, and a sign-out sign-in (NOT a restart) is needed for the new mappings to take effect. There doesn’t seem to be an equivalent key per user (HKCU), so this mapping affects the whole local machine (HKLM).

I’m having to do this because AutoHotKey is working unreliably (otherwise it is great, free software, https://www.gnu.org/philosophy/free-sw.html, and doesn’t need Admin to ‘install’, use or take effect either). In particular, although, in AutoHotKey, I mapped the «Windows key» to Ctrl, Windows+d (expected to be Ctrl-d) keeps being ‘intercepted’ by Windows first instead, causing its multiple desktop to be displayed (which I couldn’t find a way to disable), or worse a broken keyboard state to happen in which most keys won’t even function.

@echo off
setlocal

net session >nul 2>&1 || (echo This script requires Admin.&goto :eof)

rem Unfortunately, as the key "Keyboard Layout" HAS TO be written
rem under HKEY_LOCAL_MACHINE..., this needs Admin.

rem Also unfortunately, as the mappings are apparently read by the
rem keyboard driver at session start-up, once the mapping is stored in
rem the registry, a log out/log in was needed for the mapping to take
rem effect. Restarting explorer.exe did NOT do it. Microsoft docs
rem below says a restart is needed, which wasn't.

rem From
rem https://docs.microsoft.com/en-us/windows-hardware/drivers/hid/keyboard-and-mouse-class-drivers#scan-code-mapper-for-keyboards:

rem ---

rem Windows 2000 and Windows XP include a new Scan Code Mapper, which
rem provides a method that allows for mapping of scan codes. The scan
rem code mappings for Windows are stored in the following registry
rem key: syntax

rem HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout

rem Note There is also a Keyboard Layouts key (notice the plural form)
rem under the Control key, but that key should not be modified.

rem In the Keyboard Layout key, the Scancode Map value must be added.
rem This value is of type REG_BINARY (little Endian format) and has
rem the data format specified in the following table.

rem |Start offset (in bytes) | Size (in bytes) | Data                         |
rem |0                       |               4 | Header: Version Information  |
rem |4                       |               4 | Header: Flags                |
rem |8                       |               4 | Header: Number of Mappings   |
rem |12                      |               4 | Individual Mapping           |
rem |...                     |             ... | ...                          |
rem |Last 4 bytes            |               4 | Null Terminator (0x00000000) |

rem The first and second DWORDS store header information and should be
rem set to all zeroes for the current version of the Scan Code Mapper.
rem The third DWORD entry holds a count of the total number of
rem mappings that follow, including the null terminating mapping. The
rem minimum count would therefore be 1 (no mappings specified). The
rem individual mappings follow the header. Each mapping is one DWORD
rem in length and is divided into two WORD length fields. Each WORD
rem field stores the scan code for a key to be mapped.

rem Note that if the mapping of a scan code is necessary on a
rem keypress, the step is performed in user mode just before the scan
rem code is converted to a virtual key. Doing this conversion in user
rem mode can present certain limitations, such as mapping not working
rem correctly when running under Terminal Services.

rem To remove these mappings, remove the Scancode Map registry value
rem and reboot.

rem ---

rem The hex data is in five groups of four bytes:
rem   00,00,00,00,    header version (always 00000000)
rem   00,00,00,00,    header flags (always 00000000)
rem   03,00,00,00,    # of entries (2 in this case) plus a NULL terminator line.
rem                    Entries are in 2-byte pairs: Key code to send & keyboard key to send it.
rem                    Each entry is in "least significant byte, most significant byte" order,
rem                    e.g. 0x1234 becomes `34,12`
rem   1d,00,3a,00,    Send LEFT CTRL (0x001d) code when user presses the CAPS LOCK key (0x003a)
rem   1d,00,5c,e0,    Send LEFT CTRL (0x001d) code when user presses the right Windows key (0xe05c)
rem   00,00,00,00      NULL terminator

set "CapsLock=3a,00"
set "LCtrl=1d,00"
set "RCtrl=1d,e0"
set "LAlt=38,00"
set "RAlt=38,e0"
set "LWin=5b,e0"
set "RWin=5c,e0"
set "Menu=5d,e0"

set "headerVersion=00,00,00,00"
set "headerFlags=00,00,00,00"
set "numEntries=03,00,00,00"
set "mapping1=%LCtrl%,%CapsLock%"
set "mapping2=%LCtrl%,%RWin%"
set "nullTerminator=00,00,00,00"
set "data=%headerVersion%%headerFlags%%numEntries%%mapping1%%mapping2%%nullTerminator%"
set "dataNoComma=%data:,=%"

set "key=HKLMSYSTEMCurrentControlSetControlKeyboard Layout"
reg add "%key%" /f /v "Scancode Map" /t REG_BINARY /d %dataNoComma%

echo Sign out and sign in for the new key mappings to take effect.

This tutorial will show you how to swap Ctrl and Caps Lock, Ctrl and Alt, Ctrl and Shift, or basically any two keys in Windows 11 using a powerful tool called PowerToys by Microsoft.

Swap Ctrl, Caps Lock, Alt and Shift keys with each other

There is no built-in tool in Windows 11 that allows you to swap your keyboard keys. To swap keyboard keys with each other, we will need to install a software that is able to help us do so.

PowerToys, a tool developed by Microsoft for power users, has a set of utilities for customizing Windows and maximizing productivity. That includes a feature called Keyboard Manager which allows you to map any key to any key on any keyboard in Windows.

Related: How to Remap Keyboard Keys in Windows 11

Below is a detailed guide on how to download and install PowerToys, and how to use it to swap Ctrl, Caps Lock, Alt and Shift keys with each other in Windows 11.

First, go to the https://github.com/microsoft/PowerToys/releases/ and download the latest release of PowerToys (check the “Asset” section in the latest release post).

Once downloaded, run the setup to install the software. During the installation, you may be asked if you would like to allow PowerToys to start automatically on Windows startup. Allow it to do so because you will need PowerToys to run in the background to have the key swapping settings to take effect.

After installing PowerToys, run it from the desktop or Start menu. If you can’t see PowerToys window after launching the software, check on the taskbar corner to see if it’s already running and select it to open its window.

Open PowerToys Windows 11

If it’s your first time running the software, you may be asked to run it as an administrator. In the PowerToys Settings, go to General and click on Restart PowerToys as administrator under Administrator mode. Administrative privilege is required for the Keyboard Manager feature to work.

Once you’ve run PowerToys as admin, select Keyboard Manager on the left pane. Click on the toggle beside “Enable Keyboard Manager” to enable the feature and then select “Remap a key“.

PowerToys Keyboard Manager

In the Remap keys window, click on the plus button to create a new key mapping.

Add a key swapping

For example, to swap Ctrl and Caps Lock keys, click on Type under Key.

Swap Ctrl and Alt keys Windows 11

Press the Ctrl key for the tool to recognize the key press.

Swap Ctrl key

Alternatively, you can manually select the Ctrl key via the drop-down menu under Key.

Note: Ctrl (Left) acts as a different key than Ctrl (Right). Thus, if you map Ctrl (left), only the left Ctrl key will be affected.

Next, under Mapped to, since Caps Lock cannot be recognized by the tool via key press in the “Type” window, you need to manually choose Caps Lock from the drop-down menu. The list of keys is very long but it’s in alphabetical order.

Switch Ctrl to Caps Lock in Windows 11

After you’ve selected the key you want to change and the key you want it to become (Mapped to), click OK to save the key mapping.

Change Ctrl to Caps Lock

Your left Ctrl key will now become the Caps Lock key. Since this is a one way key mapping, your Caps Lock key will still act as Caps Lock.

To also change the Caps Lock key to Ctrl key, you need to add another key mapping to change Caps Lock to Ctrl (Left) by repeating the steps above.

Change Caps Lock to Ctrl key Windows 11

If the key mappings are successfully created, you should be able to see them under Keys in the Keyboard Manager.

Swap Ctrl and Caps Lock

To undo or remove the key swapping, select Remap a key, and click on the trash bin icon beside the key swap you want to delete.

Remove key swapping Windows 11

You can follow the same steps above to swap Ctrl and Alt key, or any two keys you want in Windows 11. As for swapping Ctrl and Fn keys, read below.

About swapping Fn and Ctrl keys

Note: You cannot change the Fn key using PowerToys. To swap Fn and Ctrl keys, in most cases, you will have to go to the BIOS to look for the option. Different laptop brands have different BIOS interface. However, if you are familiar with accessing BIOS, you should be able to find the option easily. Try to read your laptop’s manual or search from the manufacturer’s support website for how to change the Fn key for your laptop.

Swap Fn and Ctrl Key BIOS

In some other cases, if the laptop has its own keyboard manager software such as Lenovo Keyboard Manager, you can install and use it to swap the Fn and Ctrl keys.

Swap Ctrl and Fn keys Windows 11

In short, it all depends on the brand and model of your laptop. The methods to swap the Fn and Ctrl keys may differ from laptop to laptop.

These methods in this gist worked for me on my U.S.-based keyboard layouts. I am unsure about other layouts. If you have problems, revert your changes; delete the registry key you created (and reboot).

Update: you should probably scroll down to approach 4 where I suggest using Microsoft PowerToys Keyboard Manager.

Approach 1. Manually through regedit

Navigate to and create a new binary value in HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout named Scancode Map.

You will enter the raw bytes like this (thanks @quapka):

00 00 00 00 00 00 00 00 02 00 00 00 1d 00 3a 00 00 00 00 00

Save. Reboot. Done.

Approach 2. Make your own registry key file.

Thanks @datsuka-qwerty

Create a new .reg file and name it something meaningful like capstoctrl.reg. Edit the file and paste in the following:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

Save. Run the file. Reboot. Done.

Approach 3. Through PowerShell (as Administrator)

Open PowerShell as an administrator (Win + X)

$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"};

$kbLayout = 'HKLM:SystemCurrentControlSetControlKeyboard Layout';

New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);

Save. Reboot. Done.

Approach 4. Microsoft PowerToys

Give PowerToys a try for remapping not only capslock, but other keys as well. Microsoft PowerToys: Utilities to customize Windows 10.

Microsoft PowerToys: Keyboard Manager enables you to redefine keys on your keyboard.

For old generation people like me, or engineers who are used to unix (e.g. Sun Pizza-top work station), the position of the control key in the lower left would be difficult to use, I think. Recently, mac users may also like the control key next to the «a»  because the position of the control key is the position of the Caps Lock key of Windows.

On a different note, I prefer to use control-h or Control-d to erase characters rather than use Back Space or DELETE key because I do not want to move my fingers from my home position.

I have been using the key switch application for a long time. However, I would like to introduce this utility this time. This utility tool, which is released from Microsoft, can simply swap the control key and the caps lock key.

The above tools are utilities released by Microsoft. It has not been updated since November 2006, but I confirmed that it will also work with Windows10.

In addition, this driver operates in kernel mode, so it has less impact on the application than the key switch applications that run in user mode.

Download

Please download from the following site and unzip the downloaded file.

Ctrl2Cap v2.0

How to install

Right-click the Windows button in the lower left corner and start the command prompt (Admin).

Windows Menu

Go to the folder where Ctrl2Cap is unzipped, and then run the following command.

ctrl2cap /install 

ctrl2cap /install

Restart your PC to be done.

Take note, save ctrl2cap.zip for uninstall.

How to uninstall

As with installation, go to the ctrl2cap folder from the command prompt (Admin) and type the following command:

ctrl2cap /uninstall 

ctrl2cap /uninstall

Reboot your PC to be done.

That’s all!

I think what’s best to put on caps depends on your physical keyboard.

At home I type on a Kinesis Ergo Elan where my ctrl keys are under my thumbs, along with 2*alt, space, enter, backspace, delete, pgup, pgdn, home and end; the rest of the keyboard is fairly normally laid out, except the board is split.

With the ctrl keys ready at hand, it really makes the most sense to put escape on caps lock (and caps lock on esc, for the few times I need it). Even if you’re an emacser, hey… it doubles as a spare «prefix alt key», and you probably ask your browser to stop what it’s doing a few times every day.

On the other hand, if I’m typing on my laptop where the lower left corner key is Fn rather than ctrl (ffs…) and I can’t hold down shift+ctrl with one finger, it might make sense to put ctrl on caps (such that I can hold them with a single finger). At least if you’re not a vi’er, or you don’t mind the escape key being further away (or have some crazy system).

What’s really interesting is putting some funky key on shift+shift (yep, both shift keys). This can be done with xmodmap fairly straightforwardly; I put my compose key there. If you don’t need compose, you may want to put something else (like, say, esc).

Содержание

  1. Переключения языка ввода в Windows с помощью CapsLock
  2. Суть проблемы
  3. Меняем скан-коды
  4. Добавляем раскладки
  5. Настройка раскладок
  6. Приложение
  7. Is it worth swapping Ctrl and Caps Lock for windows users that don’t use Emacs
  8. 8 Answers 8
  9. Map capslock to control in Windows 10
  10. 11 Answers 11
  11. Map caps lock to escape in Windows
  12. Contents
  13. Registry [ ]
  14. Use the Caps Lock key as Ctrl [ ]
  15. Utilities [ ]
  16. KeyTweak [ ]
  17. SharpKeys [ ]
  18. Uncap [ ]
  19. AutoHotkey [ ]
  20. HotKeyz [ ]
  21. Dual Key Remap [ ]
  22. Keyboard Manager (Microsoft PowerToys) [ ]
  23. Explanations [ ]
  24. Registry scancodes [ ]
  25. See also [ ]
  26. Comments [ ]
  27. Смена раскладки в Windows 10 по нажатию Caps Lock
  28. AutoHotkey — скриптовый язык
  29. Скачиваем AutoHotkey (версию 1.1*)
  30. Создаем скрипт
  31. Добавляем в автозапуск
  32. А если я хочу писать капсом?
  33. Читайте также

Переключения языка ввода в Windows с помощью CapsLock

Суть проблемы

ОС Windows 7 предоставляет пользователю долгожданную возможность переключать языки ввода по обратному апострофу:

image loader

Казалось бы, удобно, но нет. Лично я вижу следующие недостатки:

Меняем скан-коды

Решение для переключения раскладки по CapsLock — это переопределение скан-кодов через реестр. Есть множество описаний как это сделать. Я могу предложить прочитать одно из них по ссылке: www.howtogeek.com.

Готовый результат выглядит вот так (файл SwitchLangByCaps.reg):

Как можно видеть, в реестре прописывается одно или несколько правил подмены вида:

.

Так что нам надо распланировать алгоритм перестановки. Первая перестановка очевидна — по нажатию CapsLock (0x3a) эмулировать нажатие на Ё (0x29). Вторая тоже примерно понятна — для того, чтобы всё-таки оставить функциональность капса, требуется переназначить на него какую-нибудь ненужную клавишу. В моём примере этой клавишей оказался ScrolLock (0x46). А вот третья перестановка отвечает за спасение буквы Ё. Для этого хитрого кода нам нужна «ненужная клавиша» с текстовой клавиатуры, Pause/Break не подойдёт. Однако, тут нам повезло. Даже на полностью задействованной русскоязычной раскладке клавиатуры есть дублирующиеся клавиши:

image loader

Вот эта кнопка в левом нижнем углу и подойдёт на роль замены букве Ё, а равно и тильде с обратным апострофом. Имеет она сканкод 0x56 и отсутствует на большинстве клавиатур, так что именно её будем эмулировать при нажатии на Ё-кнопку.

На этом этапе можно произвести изменения в реестре и отправить машину в перезагрузку.

Добавляем раскладки

Как несложно догадаться, после перезагрузки вместо буквы Ё мы получим косую черту. Для исправления ситуации, требуется поправить имеющуюся клавиатурную раскладку. Редактировать раскладки клавиатуры можно посредством утилиты Microsoft Keyboard Layout Creator 1.4. Использование программы несложно — загружаем исходную клавиатуру из списка, делаем изменения (меняем символы клавиши 0x56 на требуемые буквы Ёё), сохраняем source-файл и собираем установочный пакет из меню Project.

Ту же операцию следует проделать и с английской клавиатурой, изменив поведение обратного слэша на обратный апостроф и тильду.
В результате должны получиться две папки с установочным пакетом для клавиатурной раскладки. Выполняем установку каждой, запуская setup.exe и переходим к следующему шагу.

Настройка раскладок

Открываем «языковые настройки». Для начала, выставьте переключение раскладок по Grave accent, как показано на первой картинке этой статьи. Затем добавьте только что установленные раскладки: US-Custom и Russian-Custom. И наконец, установите дефолтный ввод через US-Custom. Это необходимо, так как раскладку US удалить не получится, но в этом тоже есть плюс — теперь при смене языка ввода меняется размер значка в трее и гораздо легче заметить, попал ли ты по CapsLock или промахнулся. Результат должен выглядеть как-то так:

image loader

Если всё прошло удачно, то вы получили возможность переключения языков ввода по CapsLock, не поплатившись за это ничем существенным. Можно спокойно покупать в офис и на работу одинаковые клавиатуры и, не задумываясь больше над алгоритмом переключения, получать удвоенное удовольствие от слепой десятипальцевой печати.

Приложение

Готовые проекты раскладок, их исходники и патч к реестру можно найти по ссылке: Я.Диск.

Источник

Is it worth swapping Ctrl and Caps Lock for windows users that don’t use Emacs

I’ve been aware of Steve Yegge’s advice to swap Ctrl and Caps Lock for a while now, although I don’t use Emacs. I’ve just tried swapping them over as an experiment and I’m finding it difficult to adjust. There are several shortcuts that are second nature to me now and I hadn’t realised quite how ingrained they are in how I use the keyboard.

I’d be interested to hear from people who have successfully made the transition as well as those who have tried it and move back, but particularly from people who were doing it on windows.

Will it lead to any improvement in my typing speed or comfort when typing.

Do you have any tips for finger positions or typing training to speed up the transition.

R15wI

8 Answers 8

I actually don’t swap control and caps and just make caps ANOTHER control key. I can’t think of a single time in my life when I have ever hit caps-lock on purpose, so I haven’t missed it.

That way, you get used to using it, but if you slip up and use the old control, things still work. It’s worked out very well for me.

I’ve done it for quite a while now, and it’s natural to me, even though I’m not an Emacs user either (I’m in the Vim camp of that particular war 🙂 ). In fact, it’s so natural that moving to other machines (coworkers, family members, etc.) causes me grief because Ctrl isn’t where it ‘ought’ to be.

I ended up taking the advice in Zach’s answer, but I also made Caps Lock behave as an ESC key if it was held and released on it’s own using the AutoHotKey script in this gist: CapsLockCtrlEscape.ahk

I also bound Ctrl + Shift + Caps Lock to Caps Lock for the rare occasions when I might need it using this AutoHotKey script:

R15wI

I switched the Caps Lock and Ctrl keys a couple of months ago and after the initial learning period,

1 week, my biggest problem is when I use a computer that hasn’t switched the keys.

I first did some registry hack but I can’t remember where I found the information on how to do it. Now I’m using a small utility called Remapkey which is included in the Windows Server 2003 Resource Kit Tools even though I think I’m using an older version.

I had no problem making the transition. I use keyboards with both configurations without issue. Perhaps having it as a hardware solution (and the labels properly printed) makes it easier than doing it through software and having to remember how each machine/keyboard is setup.

I think what’s best to put on caps depends on your physical keyboard.

At home I type on a Kinesis Ergo Elan where my ctrl keys are under my thumbs, along with 2*alt, space, enter, backspace, delete, pgup, pgdn, home and end; the rest of the keyboard is fairly normally laid out, except the board is split.

With the ctrl keys ready at hand, it really makes the most sense to put escape on caps lock (and caps lock on esc, for the few times I need it). Even if you’re an emacser, hey. it doubles as a spare «prefix alt key», and you probably ask your browser to stop what it’s doing a few times every day.

On the other hand, if I’m typing on my laptop where the lower left corner key is Fn rather than ctrl (ffs. ) and I can’t hold down shift+ctrl with one finger, it might make sense to put ctrl on caps (such that I can hold them with a single finger). At least if you’re not a vi’er, or you don’t mind the escape key being further away (or have some crazy system).

What’s really interesting is putting some funky key on shift+shift (yep, both shift keys). This can be done with xmodmap fairly straightforwardly; I put my compose key there. If you don’t need compose, you may want to put something else (like, say, esc).

Источник

Map capslock to control in Windows 10

In Windows 8 I used to remap my capslock key to control using the registry script

After having upgraded to Window 10, this does not work anymore.

How can it be done?

11 Answers 11

Did you remember to reboot? It works fine for me, just like in Windows 7 and 8.

ifAif

In case anyone needed this done via PowerShell:

Run it as Administrator and reboot.

zUoEd

iyD4p

Qv52g

You can use SharpKeys to map any key to any other key in Windows 7, 8, or 10. It’s much easier and cleaner to do than to modify the registry yourself.

I use the following to send CTRL for the CAPS LOCK key, send ALT for the CTRL key, and send CAPS LOCK for the ALT key. CTRL is to the left of «A» where God intended it, ALT is below SHIFT, and the utterly useless CAPS LOCK key is safely tucked away where I have to break my wrist to hit it.

fHj5Q

I used to use AutoHotKey to do this.

I’d have a link in the startup directory to run a very basic ahk script:

The thing is, Autohotkey isn’t run as Administrator so it won’t affect privileged windows, unless you use the task scheduler instead of the startup directory to run the script at login with higher privileges. The second problem is that sometimes, the script hangs when resuming sleep, so you may need to reload it, which is annoying.

AutoHotKey is better suited for more complex tasks, like writing macros.

Источник

Map caps lock to escape in Windows

created 2001 · complexity basic · author Igor Prischepoff · version 6.0

This tip shows some methods for mapping keys within the operating system to make life easier in Vim. In particular, it can be convenient to use the CapsLock key for Escape so you don’t have to reach for the Esc key. It is also useful to use the CapsLock key for Ctrl and press Ctrl-[ instead of Esc.

This tip is for Windows systems (not Windows 9x). For Unix-based systems, see Map caps lock to escape in XWindows.

Some of the procedures here change the way keys behave for all applications. It may be better to use other methods to avoid the escape key in Vim.

Contents

Registry [ ]

Before trying the following, you should run regedit.exe and inspect the relevant registry keys, and export them for a backup. Make sure you know how to remove the registry changes if they cause trouble.

For the current user (doesn’t work in Windows 7 or 8 and 10): To map CapsLock to Escape, and ScrollLock to CapsLock, create file (for example) keys.reg containing:

Use Explorer to double-click the file to import the value to the registry. To apply the changes, log off and log on. Then, pressing key Esc will generate Escape as normal, pressing CapsLock will also generate Escape, and pressing ScrollLock will generate CapsLock (and you cannot generate ScrollLock).

Alternatively, for the change to apply to all users, run the following reg file and reboot (this key still works in Windows 7 or 8 and 10):

To restore the keyboard, run regedit.exe and delete the «Scancode Map» entry from HKEY_CURRENT_USER (and log off/on), or from HKEY_LOCAL_MACHINE (and reboot), depending on which section of the registry you changed.

Use the Caps Lock key as Ctrl [ ]

Particularly while touch typing, it can be useful to remap the keyboard so that pressing CapsLock is the same as pressing Ctrl. This change makes it easy to press Ctrl-[ as an alternative to pressing Esc.

Map CapsLock to LeftCtrl (press CapsLock to generate LeftCtrl):

An alternative would be to replace the «Scancode Map» line with the following to swap CapsLock and LeftCtrl:

Utilities [ ]

As an alternative to changing the registry, there are various utilities that can remap keys. Many of these can be run by a non-administrator, and can apply mappings only when wanted (for example, when running Vim). They do not require log off/on or reboot to apply changes, unless specified otherwise.

KeyTweak [ ]

KeyTweak is a free keyboard remapper for Windows NT/2000/XP/Vista/Win 7. It automates the registry trick above (it makes use of Microsoft’s Scancode Map registry key) to remap your keyboard. This app requires you to reboot before changes take effect.

SharpKeys [ ]

This tool is a free keyboard mapper, but requires rebooting the machine for the key mapping to take effect. The interface is fairly simple to use, and appears to work on Windows NT/2003 server/2000/XP/Vista/Win 7/Win 10. By automating the keyboard mapping, this reduces the risk of the user accidentally changing something in the registry.

Uncap [ ]

Uncap is an open source project to map CapsLock to Escape, or any key to any key. It is a single-file executable that can be downloaded and run without setup or reboot. The key mappings are not permanent: they last only as long as Uncap is running.

If Uncap is run without any arguments, it maps CapsLock to Escape while leaving Escape unchanged. Run uncap 0x1b:0x14 to swap CapsLock and Escape.

AutoHotkey [ ]

AutoHotkey is an open source project to automate sending keys and mouse clicks. It can remap keys, and provides a powerful scripting language, and does not require administrator rights. One of the features of this program is that the key mappings are not permanent, but only last as long as the program is running.

To make Capslock work like Escape, add the following to the default script:

The following AutoHotkey script will turn off CapsLock and generate Escape when Esc is pressed:

The following AutoHotkey script maps CapsLock to Ctrl in PuTTY. In other applications, CapsLock works normally.

The following AutoHotkey script maps CapsLock to ESC in Vim. In other applications, CapsLock works normally.

The following AutoHotKey script switches CapsLock and Escape. When the application is shut down, the keys return to their normal behavior:

The following AutoHotKey script tries to emulate an idea I read about from Steve Losh where he overloaded his CapsLock key to do the following: pressing CapsLock and another key is equivalent to pressing Ctrl and the other key, but pressing and releasing CapsLock is equivalent to pressing Escape.

Here is a script that works with all keys: acts as left control when pressed and sends esc when pressed and released in under one second:

The following script follows the same idea as the above while helping its shortcomings, and is more concise. It works by checking the last pressed key when the CapsLock key is released. Hope it helps 🙂

This script often fails when ran in a Juniper Terminal Services remote desktop session. The remote Windows start menu is displayed instead of sending escape. This is caused by the interference between a local and the remote script. Disable local hotkeys or use the basic script on the remote host.

Here’s an additional solution (which just sends Esc key when Ctrl is pressed alone, but does not modify CapsLock in any way)

HotKeyz [ ]

HotKeyz (freeware) is useful for assigning keyboard shortcuts to run frequently used applications using the key. It also allows CapsLock to be remapped to any key sequence, or to run an application.

The only disadvantage compared to the registry method is that the status of CapsLock is still set and is checked by applications, so if you press it letting the status LED of the keyboard turn on and then start an application, for example Notepad, you will start typing in uppercase and can’t change it anymore. You have then to exit the application, turn the CapsLock status off and re-open the program. This is still easier than rebooting.

Dual Key Remap [ ]

Dual Key Remap is an open source project that enables mapping CapsLock to both Escape and Ctrl simultaneously. The idea is that, for efficiency and ergonomic, Escape can be triggered when CapsLock is pressed alone whereas Ctrl can be triggered when CapsLock is used in combination with other keys. It’s an alternative to some of the AutoHotkey solutions described below, and avoids leaked or stuck keystrokes. The mapping is not permanent and lasts as long as Dual Key Remap is running.

Keyboard Manager (Microsoft PowerToys) [ ]

Microsoft PowerToys is an open source project from Microsoft that gives a set of utilities for power users. It requires Windows 10 v1803 minimum. One of these utilities is the Keyboard Manager. Keyboard Manager allows remapping keys to other keys or shortcuts. It can also remap the keys only for specific applications. For Keyboard Manager to work, PowerToys needs to be kept running.

Explanations [ ]

Registry scancodes [ ]

The format used for «Scancode Map» in the registry is described below (from Scan Code Mapper for Windows and Keyboard scan codes). More information is at Remap the F12 Key, CapsLock Key or any Key in Windows XP, 2000, Vista and 2003.

«Scancode Map» is a registry binary value with the following format (each value is a 32-bit integer in little-endian order):

A mapping consists of two 16-bit scancodes. The second scancode (high word) from the keyboard is replaced with the first scancode (low word). Some relevant scancodes are:

For example, the line

consists of one mapping ( 01,00,3a,00 ) which replaces the scancode 0x003a with 0x0001. That means that pressing CapsLock (0x3a) will generate Escape (0x01).

See also [ ]

It’s explaining what the string of bytes in the registry represent in the «Scancode Map» value in some of the ideas. It applies to the first part of the tip. JohnBeckett (talk) 08:40, December 16, 2014 (UTC)

Note that the new location to update the registry (Windows 10, Jan 2019) is:

HKEY_LOCAL_MACHINESYSTEMCurrent Control SetControlKeyboard Layout

Источник

Смена раскладки в Windows 10 по нажатию Caps Lock

Делаем так, чтобы при нажатии Caps Lock в Windows 10 менялась раскладка клавиатуры.

AutoHotkey — скриптовый язык

Если в Linux Mint надо просто ткнуть галочку в гуе настройки клавы, то в винде из коробки так сделать не дают. Поэтому будем использовать софтину AutoHotkey. Бесплатная, опенсорсная, GPL.

Вообще говоря, AutoHotkey — это скриптовый язык, который позволяет делать макросы, биндить что-то на сочетания клавиш и прочее. Вероятно, потенциал у программы больше, чем просто перебиндить одну клавишу, но другими функциями пользоваться, увы, не доводилось.

Скачиваем AutoHotkey (версию 1.1*)

Идем на официальный сайт AutoHotkey и скачиваем установщик, устанавливаем.

smena raskladki v windows 10 po nazhatiyu caps lock 5c54406a9135f

Стоит отметить, что речь в этом тексте идет про версию v1.1.28.02. В альфа тестировании находится вторая версия, в которой будет сломана обратная совместимость. Я попробовал было ее, но с разбегу старый скрипт не завелся.

Создаем скрипт

Добавляем в автозапуск

А если я хочу писать капсом?

Читайте также

По какой-то причине, в Docker под Windows запускаются не все версии MySQL и его форков. Приведу небольшой список того, что…

Одна из самых неприятных вещей в Windows 10 — автоматическая перезагрузка для установки обновлений. Несмотря на то, что она не…

Источник

Feeds

HomePopular

Topics

ValheimGenshin ImpactMinecraftPokimaneHalo InfiniteCall of Duty: WarzonePath of ExileHollow Knight: SilksongEscape from TarkovWatch Dogs: Legion

NFLNBAMegan AndersonAtlanta HawksLos Angeles LakersBoston CelticsArsenal F.C.Philadelphia 76ersPremier LeagueUFC

GameStopModernaPfizerJohnson & JohnsonAstraZenecaWalgreensBest BuyNovavaxSpaceXTesla

CardanoDogecoinAlgorandBitcoinLitecoinBasic Attention TokenBitcoin Cash

The Real Housewives of AtlantaThe BachelorSister Wives90 Day FianceWife SwapThe Amazing Race AustraliaMarried at First SightThe Real Housewives of DallasMy 600-lb LifeLast Week Tonight with John Oliver

Kim KardashianDoja CatIggy AzaleaAnya Taylor-JoyJamie Lee CurtisNatalie PortmanHenry CavillMillie Bobby BrownTom HiddlestonKeanu Reeves

Animals and PetsAnimeArtCars and Motor VehiclesCrafts and DIYCulture, Race, and EthnicityEthics and PhilosophyFashionFood and DrinkHistoryHobbiesLawLearning and EducationMilitaryMoviesMusicPlacePodcasts and StreamersPoliticsProgrammingReading, Writing, and LiteratureReligion and SpiritualityScienceTabletop GamesTechnologyTravel

Create an account to follow your favorite communities and start taking part in conversations.

PostsWikiSubreddit RulesDiscord Server

r/windows

0

Posted by8 years ago

Archived

as topic, i been used to using ctrl key this way on linux so I was hoping for a way to swap these keys on windows 10 too.

Thanks!

2 comments

50% Upvoted

This thread is archived

New comments cannot be posted and votes cannot be cast

level 1

· 8 yr. ago

Yes, you can use a program called sharpkeys. Follow this article

2

level 1

· 8 yr. ago

Try the Microsoft Keyboard Layout Creator: https://www.microsoft.com/en-us/download/details.aspx?id=22339

e: Nevermind, it appears to not allow you to mess with the control and capslock keys.

1

About Community

Subreddit Icon

r/windows

Welcome to the largest unofficial community for Microsoft Windows, the world’s most popular desktop computer operating system!

Created Jan 25, 2008


268k

Insiders

376

Updating their PC

Top 1%

Ranked by Size


Top posts august 1st 2015Top posts of august, 2015Top posts 2015

User AgreementPrivacy policy

Content policyModerator Code of Conduct

Reddit Inc © 2023. All rights reserved

Why switch caps lock for control

This is something that I have done on every machine I own for years. As a developer I spend a good portion of my day using the terminal. Being obsessed with efficency, I try to use my keyboard for everything as moving my hands to use a mouse/touchpad is not efficient. The use case for mapping caps lock to control is simple; I use control more often than caps lock and I do not need my fingers to leave the home row to press the key that is next to “a”. When I was using a mac this was useful mainly for jumping around the command line and there is some decent support for EMACS-style navigation in OSX (for example, CTRL+A to get to the beginning of a line could be used in web browsers).

This is even more useful on Windows and Linux systems because you use the control key for many common things (copy, paste, undo, redo, etc…).

How to make the swap

There are two straight forward ways to do this

PowerShell

This is the easiest way. To start open Windows PowerShell (Admin) by pressing Win + X. Then enter these commands:

$hexified = "00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00".Split(',') | % { "0x$_"};

$kbLayout = 'HKLM:SystemCurrentControlSetControlKeyboard Layout';

New-ItemProperty -Path $kbLayout -Name "Scancode Map" -PropertyType Binary -Value ([byte[]]$hexified);

Save and reboot.

PowerToys

PowerToys is a tool created by Microsoft that enables users to customize their Windows experience in a visual interface. It is open source and can be installed from Here

Once Installed go to the Keyboard Manager tabl and click Remap a Key. Select caps lock to control and you’re good to go.

PowerToys Remap

This tip shows some methods for mapping keys within the operating system to make life easier in Vim. In particular, it can be convenient to use the CapsLock key for Escape so you don’t have to reach for the Esc key. It is also useful to use the CapsLock key for Ctrl and press Ctrl-[ instead of Esc.

This tip is for Windows systems (not Windows 9x). For Unix-based systems, see Map caps lock to escape in XWindows.

Some of the procedures here change the way keys behave for all applications. It may be better to use other methods to avoid the escape key in Vim.

Registry[]

WARNING: Editing your Windows registry may cause unintended side effects that render your system inoperable. Although this tip has worked in the past for some people, there is no guarantee that it will work for you. Use with caution, and at your own risk.

Before trying the following, you should run regedit.exe and inspect the relevant registry keys, and export them for a backup. Make sure you know how to remove the registry changes if they cause trouble.

For the current user (doesn’t work in Windows 7 or 8 and 10): To map CapsLock to Escape, and ScrollLock to CapsLock, create file (for example) keys.reg containing:

REGEDIT4

[HKEY_CURRENT_USERKeyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,46,00,01,00,3a,00,00,00,00,00

Use Explorer to double-click the file to import the value to the registry. To apply the changes, log off and log on. Then, pressing key Esc will generate Escape as normal, pressing CapsLock will also generate Escape, and pressing ScrollLock will generate CapsLock (and you cannot generate ScrollLock).

Alternatively, for the change to apply to all users, run the following reg file and reboot (this key still works in Windows 7 or 8 and 10):

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,46,00,01,00,3a,00,00,00,00,00

To restore the keyboard, run regedit.exe and delete the «Scancode Map» entry from HKEY_CURRENT_USER (and log off/on), or from HKEY_LOCAL_MACHINE (and reboot), depending on which section of the registry you changed.

Use the Caps Lock key as Ctrl[]

Particularly while touch typing, it can be useful to remap the keyboard so that pressing CapsLock is the same as pressing Ctrl. This change makes it easy to press Ctrl-[ as an alternative to pressing Esc.

The following applies to the current user on Windows XP or earlier (log off and log on to apply). Alternatively, an administrator can apply the change to all users (reboot to apply) by replacing [HKEY_CURRENT_USERKeyboard Layout] with [HKEY_LOCAL_MACHINESYSTEMCurrentControlSetControlKeyboard Layout]. This will also work on Windows 7 or higher.

Map CapsLock to LeftCtrl (press CapsLock to generate LeftCtrl):

REGEDIT4
[HKEY_CURRENT_USERKeyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

An alternative would be to replace the «Scancode Map» line with the following to swap CapsLock and LeftCtrl:

"Scancode Map"=hex:00,00,00,00,00,00,00,00,03,00,00,00,3a,00,1d,00,1d,00,3a,00,00,00,00,00

Utilities[]

As an alternative to changing the registry, there are various utilities that can remap keys. Many of these can be run by a non-administrator, and can apply mappings only when wanted (for example, when running Vim). They do not require log off/on or reboot to apply changes, unless specified otherwise.

KeyTweak[]

KeyTweak is a free keyboard remapper for Windows NT/2000/XP/Vista/Win 7. It automates the registry trick above (it makes use of Microsoft’s Scancode Map registry key) to remap your keyboard. This app requires you to reboot before changes take effect.

SharpKeys[]

This tool is a free keyboard mapper, but requires rebooting the machine for the key mapping to take effect. The interface is fairly simple to use, and appears to work on Windows NT/2003 server/2000/XP/Vista/Win 7/Win 10. By automating the keyboard mapping, this reduces the risk of the user accidentally changing something in the registry.

https://github.com/randyrants/sharpkeys/releases

Uncap[]

Uncap is an open source project to map CapsLock to Escape, or any key to any key. It is a single-file executable that can be downloaded and run without setup or reboot. The key mappings are not permanent: they last only as long as Uncap is running.

If Uncap is run without any arguments, it maps CapsLock to Escape while leaving Escape unchanged. Run uncap 0x1b:0x14 to swap CapsLock and Escape.

AutoHotkey[]

AutoHotkey is an open source project to automate sending keys and mouse clicks. It can remap keys, and provides a powerful scripting language, and does not require administrator rights. One of the features of this program is that the key mappings are not permanent, but only last as long as the program is running.

To make Capslock work like Escape, add the following to the default script:

Capslock::Esc

The following AutoHotkey script will turn off CapsLock and generate Escape when Esc is pressed:

Esc::
SetCapsLockState, off
Suspend On
Send, {ESC}
Suspend Off
return

The following AutoHotkey script maps CapsLock to Ctrl in PuTTY. In other applications, CapsLock works normally.

classname = ""
keystate = ""

*CapsLock::
 WinGetClass, classname, A
 if (classname = "PuTTY")
   send,{Ctrl down}
 else
   GetKeyState, keystate, CapsLock, T
 if (keystate = "D")
   SetCapsLockState, Off
 else
   SetCapsLockState, On
 return

*CapsLock up::
 WinGetClass, classname, A
 if (classname = "PuTTY")
   send,{Ctrl up}
 return

The following AutoHotkey script maps CapsLock to ESC in Vim. In other applications, CapsLock works normally.

classname = ""
keystate = ""

*Capslock::
  WinGetClass, classname, A
  if (classname = "Vim")
  {
    SetCapsLockState, Off
    Send, {ESC}
  }
  else
  {
    GetKeyState, keystate, CapsLock, T
    if (keystate = "D")
      SetCapsLockState, Off
    else
      SetCapsLockState, On
    return
  }
  return

The following AutoHotKey script switches CapsLock and Escape. When the application is shut down, the keys return to their normal behavior:

CapsLock::Esc
Esc::
  if (GetKeyState("CapsLock", "T")) {
    SetCapsLockState, Off
  } else {
    SetCapsLockState, On
  }
return

The following AutoHotKey script tries to emulate an idea I read about from Steve Losh where he overloaded his CapsLock key to do the following: pressing CapsLock and another key is equivalent to pressing Ctrl and the other key, but pressing and releasing CapsLock is equivalent to pressing Escape.

; Sends Esc if capslock is pressed alone
; Sends Ctrl+key if capslock is pressed with another key
; TODO: work with arrow keys and other modifiers (e.g. shift, control)

SetCapsLockState AlwaysOff
CapsLock::Send {esc}
CapsLock & a::Send ^a
CapsLock & b::Send ^b
CapsLock & c::Send ^c
CapsLock & d::Send ^d
CapsLock & e::Send ^e
CapsLock & f::Send ^f
CapsLock & g::Send ^g
CapsLock & h::Send ^h
CapsLock & i::Send ^i
CapsLock & j::Send ^j
CapsLock & k::Send ^k
CapsLock & l::Send ^l
CapsLock & m::Send ^m
CapsLock & n::Send ^n
CapsLock & o::Send ^o
CapsLock & p::Send ^p
CapsLock & q::Send ^q
CapsLock & r::Send ^r
CapsLock & s::Send ^s
CapsLock & t::Send ^t
CapsLock & u::Send ^u
CapsLock & v::Send ^v
CapsLock & w::Send ^w
CapsLock & x::Send ^x
CapsLock & y::Send ^y
CapsLock & z::Send ^z
CapsLock & 0::Send ^0
CapsLock & 1::Send ^1
CapsLock & 2::Send ^2
CapsLock & 3::Send ^3
CapsLock & 4::Send ^4
CapsLock & 5::Send ^5
CapsLock & 6::Send ^6
CapsLock & 7::Send ^7
CapsLock & 8::Send ^8
CapsLock & 9::Send ^9
; how to scape ` and ; ?
; CapsLock & `::Send ^`
; CapsLock & ; ::Send ^;
CapsLock & '::Send ^'
CapsLock & ,::Send ^,
CapsLock & .::Send ^.
CapsLock & /::Send ^/
CapsLock & -::Send ^-
CapsLock & =::Send ^=
CapsLock & [::Send ^[
CapsLock & ]::Send ^]

Here is a script that works with all keys: acts as left control when pressed and sends esc when pressed and released in under one second:

SetCapsLockState Off
state:=false
Esc::
 state:= not state
 if (state) {
	 SetCapsLockState On
 } else {
	 SetCapsLockState Off
 }
 Return

*CapsLock::
	Send {LControl down}
	Return
*CapsLock up::
	Send {LControl Up}
	if (A_PriorKey=="CapsLock"){
		if (A_TimeSincePriorHotkey < 1000)
			Suspend On
			Send, {Esc}
			Suspend Off
	}
	Return
; The next part is only relevant to users of Virtual Box, which interacts weirdly with AutoHotkey. The code below resets ctrl  and caps lock when a Virtual Box window is unfocused.
InVB()
{
	return WinActive("ahk_exe VirtualBox.exe")
}
in_vb:=InVB()
was_in_vb:=in_vb

Gui +LastFound 
hWnd := WinExist()
DllCall( "RegisterShellHookWindow", UInt,Hwnd )
MsgNum := DllCall( "RegisterWindowMessage", Str,"SHELLHOOK" )
OnMessage( MsgNum, "ShellMessage" )

ShellMessage( wParam,lParam )
{
 global in_vb
 global was_in_vb
 was_in_vb:=in_vb
 in_vb:=InVB()
 if (was_in_vb and not in_vb)
 {
	Suspend On
	Send {LControl Up}
	SetCapsLockState Off
	Suspend Off
 }
}

The following script follows the same idea as the above while helping its shortcomings, and is more concise. It works by checking the last pressed key when the CapsLock key is released. Hope it helps  :)

This script often fails when ran in a Juniper Terminal Services remote desktop session. The remote Windows start menu is displayed instead of sending escape. This is caused by the interference between a local and the remote script. Disable local hotkeys or use the basic script on the remote host.

; Author: fwompner gmail com
#InstallKeybdHook
SetCapsLockState, alwaysoff
Capslock::
Send {LControl Down}
KeyWait, CapsLock
Send {LControl Up}
if ( A_PriorKey = "CapsLock" )
{
    Send {Esc}
}
return

Here’s an additional solution (which just sends Esc key when Ctrl is pressed alone, but does not modify CapsLock in any way)

;Author: Autohotkey forum user RHCP
;http://www.autohotkey.com/board/topic/103174-dual-function-control-key/
$~*Ctrl::
if !state
    state :=  (GetKeyState("Shift", "P") ||  GetKeyState("Alt", "P") || GetKeyState("LWin", "P") || GetKeyState("RWin", "P"))
return

$~ctrl up::
if instr(A_PriorKey, "control") && !state
    send {esc}
state := 0
return

HotKeyz[]

HotKeyz (freeware) is useful for assigning keyboard shortcuts to run frequently used applications using the <Win> key. It also allows CapsLock to be remapped to any key sequence, or to run an application.

The only disadvantage compared to the registry method is that the status of CapsLock is still set and is checked by applications, so if you press it letting the status LED of the keyboard turn on and then start an application, for example Notepad, you will start typing in uppercase and can’t change it anymore. You have then to exit the application, turn the CapsLock status off and re-open the program. This is still easier than rebooting.

Dual Key Remap[]

Dual Key Remap is an open source project that enables mapping CapsLock to both Escape and Ctrl simultaneously. The idea is that, for efficiency and ergonomic, Escape can be triggered when CapsLock is pressed alone whereas Ctrl can be triggered when CapsLock is used in combination with other keys. It’s an alternative to some of the AutoHotkey solutions described below, and avoids leaked or stuck keystrokes. The mapping is not permanent and lasts as long as Dual Key Remap is running.

Keyboard Manager (Microsoft PowerToys)[]

Microsoft PowerToys is an open source project from Microsoft that gives a set of utilities for power users. It requires Windows 10 v1803 minimum. One of these utilities is the Keyboard Manager. Keyboard Manager allows remapping keys to other keys or shortcuts. It can also remap the keys only for specific applications. For Keyboard Manager to work, PowerToys needs to be kept running.

Explanations[]

Registry scancodes[]

The format used for «Scancode Map» in the registry is described below (from Scan Code Mapper for Windows and Keyboard scan codes). More information is at Remap the F12 Key, CapsLock Key or any Key in Windows XP, 2000, Vista and 2003.

«Scancode Map» is a registry binary value with the following format (each value is a 32-bit integer in little-endian order):

<00000000> <00000000> <NumberFollowingIntegers> <Mapping1> <Mapping2> ... <00000000>

A mapping consists of two 16-bit scancodes. The second scancode (high word) from the keyboard is replaced with the first scancode (low word). Some relevant scancodes are:

0x01 Esc
0x1D L-Ctrl
0x38 L-Alt
0x3A CapsLock
0x46 ScrollLock
0x0E Backspace

For example, the line

"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,01,00,3a,00,00,00,00,00

consists of one mapping (01,00,3a,00) which replaces the scancode 0x003a with 0x0001. That means that pressing CapsLock (0x3a) will generate Escape (0x01).

See also[]

  • Discussion page for more details and alternatives
  • Avoid the escape key for Vim methods to make pressing Esc easier

[]

What is the «Explanations» section trying to explain? I didn’t look in detail (this is a big article) but it doesn’t seem to apply directly to the methods listed above. —Fritzophrenic (talk) 19:33, December 15, 2014 (UTC)

It’s explaining what the string of bytes in the registry represent in the «Scancode Map» value in some of the ideas. It applies to the first part of the tip. JohnBeckett (talk) 08:40, December 16, 2014 (UTC)

Note that the new location to update the registry (Windows 10, Jan 2019) is:

HKEY_LOCAL_MACHINESYSTEMCurrent Control SetControlKeyboard Layout

—February 5, 2019

Like this post? Please share to your friends:
  • Symbolic debugger for windows что это
  • Sw2010 2016 activator gui ssq exe не работает windows
  • Symbol usb sync cradle driver windows 10 x64
  • Sw update samsung windows 7 скачать для x64
  • Symbol usb activesync rndis driver windows 10