Code Monkey home page Code Monkey logo

inputswitcherx's Introduction

InputSwitcherX

Installation and Patching

  1. Read the notes first.
  2. Download Python 3 from official site - https://www.python.org/downloads/
  3. Launch installer, click add python to PATH
  4. Clone this repository and cd there with command:
git clone https://github.com/StormExecute/InputSwitcherX.git && cd InputSwitcherX
  1. Apply the patch with the following command :
python usePatch.py

Roll back the patch

Requires a directory "backup":

python offPatch.py

Another patching way (old)

If you have Windows 10 2004 - you can just download InputSwitch2004Output.dll from here, then rename it to InputSwitch.dll, move to output folder in InputSwitcherX directory and run setPatch.bat as administrator

Description and Notes

Starting from version 1.1.0 the patch is also applied to the InputSwitch.dll files found in %windir%\winsxs\ and subdirectories that have inputswitch in the name. In addition, an experimental patch has been applied for inconsistent values between FF FF 83 F8 FF and 33 C0 8B.

This is patcher for %windir%\system32\InputSwitch.dll . Its main purpose is to prevent the language switching animation from appearing.

To accomplish its task - the patch overwrites some hex data, which is responsible for the appearance of the above animation of the layout.

Finding and changing the correct hex address is a risky task and perhaps for someone this patch will do more harm than good, so the responsibility for applying it is entirely up to whoever applies this patch!

Regarding which hex data the patch rewrites. First of all, the details described in a special forum topic dedicated to this problem were taken into account - https://www.cyberforum.ru/windows10/thread2466696.html#post14150170 .

Comparing the differences between the patched and the original files, duplicate hex sections were identified that begin with FF FF 83 F8 FF and continue like 74 1F 48 63 D0 (not always).

The continuing hex data in the patched file has been replaced with a void that continues until the next combination: 33 C0 48 or 8B.

Based on the fact that the void in the file after the fix solves the original problem - replacing the same sections in the new version of the file should bring the desired result.

Roughly speaking, this patch replaces sections after FF FF 83 F8 FF to 33 C0 48 or 8B with 90, which is a void.

Special thanks

NShut (https://www.cyberforum.ru/windows10/thread2466696.html#post14150170) - for data that helped automate the patching process

Waysek (https://www.cyberforum.ru/windows10/thread2466696-page2.html#post14410402) - for the base of .bat file posted in the final release of this repository

inputswitcherx's People

Contributors

stormexecute avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

inputswitcherx's Issues

"Can't patch this dll" on Insider Build 22543

image

Процесс патчинга начинается. Отключение explorer.exe...
SUCCESS: The process "explorer.exe" with PID 3192 has been terminated.

SUCCESS: The file (or folder): "C:\WINDOWS\System32\InputSwitch.dll" now owned by the administrators group.
processed file: C:\WINDOWS\System32\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files
ERROR! FilePath: C:\WINDOWS\System32\InputSwitch.dll : cant patch this dll!
Successfully processed 1 files; Failed processing 0 files
processed file: C:\WINDOWS\System32\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files
processed file: C:\WINDOWS\System32\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files
WARN! FilePath: C:\WINDOWS\WinSxS\amd64_microsoft-windows-inputswitch.resources_31bf3856ad364e35_10.0.22543.1000_en-us_adca65fc26024ae1\InputSwitch.dll : not exists
WARN! FilePath: C:\WINDOWS\WinSxS\amd64_microsoft-windows-inputswitch.resources_31bf3856ad364e35_10.0.22543.1000_ru-ru_f6eb7db077074688\InputSwitch.dll : not exists

SUCCESS: The file (or folder): "C:\WINDOWS\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_201f5d39ed604126\InputSwitch.dll" now owned by the administrators group.
processed file: C:\WINDOWS\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_201f5d39ed604126\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files
ERROR! FilePath: C:\WINDOWS\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_201f5d39ed604126\InputSwitch.dll : cant patch this dll!
Successfully processed 1 files; Failed processing 0 files
processed file: C:\WINDOWS\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_201f5d39ed604126\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files
processed file: C:\WINDOWS\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_201f5d39ed604126\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files

SUCCESS: The file (or folder): "C:\WINDOWS\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_2a74078c21c10321\InputSwitch.dll" now owned by the administrators group.
processed file: C:\WINDOWS\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_2a74078c21c10321\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files
ERROR! FilePath: C:\WINDOWS\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_2a74078c21c10321\InputSwitch.dll : cant patch this dll!
Successfully processed 1 files; Failed processing 0 files
processed file: C:\WINDOWS\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_2a74078c21c10321\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files
processed file: C:\WINDOWS\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22543.1000_none_2a74078c21c10321\InputSwitch.dll
Successfully processed 1 files; Failed processing 0 files
Патч завершился с ошибками. Это есть не добрый знак. Попытайтесь откатить изменения с помощью "python offPatch.py"

I've attached the failing DLLs:
inputswitch.zip

FIX WIN 11 \ РЕШЕНИЕ ПРОБЛЕМЫ

НЕ ИСПОЛЬЗУЙТЕ setPatch.bat на вин 11 потому что после перезапуска приведет к черному экрану!

DO NOT USE setPatch.bat on wine 11 because after restarting it will cause a black screen!

Request of hotkeys ban

Can you please disable Win+Space hotkey completely? Also as new useless hotkeys like emoji panel (it has 2 hotkeys Win+; and Win+.), Win+W, Win+W, Win+U, Win+I, Win+X. They can not be disabled via registry.

A different WORKING and universal solution

Hello!

I got fed up with that problem, so I made my own solution. It involves installing ExplorerPatcher (it is opensource though), but should be compatible with probably almost all Windows versions (as I'm using the MS Symbols store for the patching), and, best of all, doesn't touch any system files, doing all the patching in-memory.

Check out my ExplorerPatcher plugin.

More "elegant" solution

Hey bud! Thank you for the starting point. I've played a bit with x64dbg and IDA and found that changing 1 byte in a sub-procedure does the trick too.
изображение
So basically shit happens in this proc marked yellow.
I moved to it and inserted return at the start, changing byte 57 to C3.
изображение
изображение
Here are 2 files: one (.dll.bak) is original inputswitch.dll, other is modified. You can compare them by content and see where the byte has been changed.

inputswitch.zip

Basically, byte sequence is:

48 89 5C 24 08 48 89 6C  24 10 48 89 74 24 18 57
48 83 EC 40 48 63 FA 48  8B D9 48 85 C9

It should define the procedure ambiguously, where 57 should be replaced with C3.
BTW, it disables this shitty Win+Space language switching key combination as well.

Thank you for the good job!
P.S. I will find the way to patch it without installing Python, shouldn't be that hard. It's just "Kill explorer.exe, find some bytes, change some bytes, start explorer.exe"

"Can't patch this dll" on OS Assembly 22621.521

`Процесс патчинга начинается. Отключение explorer.exe...
Успешно: Процесс "explorer.exe", с идентификатором 9900, был завершен.

Успех. Владельцем файла (или папки) "C:\Windows\System32\InputSwitch.dll" является группа администраторов.
обработанный файл: C:\Windows\System32\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов
ERROR! FilePath: C:\Windows\System32\InputSwitch.dll : cant patch this dll!
Успешно обработано 1 файлов; не удалось обработать 0 файлов
обработанный файл: C:\Windows\System32\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов
обработанный файл: C:\Windows\System32\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов
WARN! FilePath: C:\Windows\WinSxS\amd64_microsoft-windows-inputswitch.resources_31bf3856ad364e35_10.0.22621.1_ru-ru_1e6ef6ae7e592491\InputSwitch.dll : not exists

Успех. Владельцем файла (или папки) "C:\Windows\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_47a2d637f4b21f2f\InputSwitch.dll" является группа администраторов.
обработанный файл: C:\Windows\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_47a2d637f4b21f2f\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов
ERROR! FilePath: C:\Windows\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_47a2d637f4b21f2f\InputSwitch.dll : cant patch this dll!
Успешно обработано 1 файлов; не удалось обработать 0 файлов
обработанный файл: C:\Windows\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_47a2d637f4b21f2f\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов
обработанный файл: C:\Windows\WinSxS\amd64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_47a2d637f4b21f2f\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов

Успех. Владельцем файла (или папки) "C:\Windows\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_51f7808a2912e12a\InputSwitch.dll" является группа администраторов.
обработанный файл: C:\Windows\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_51f7808a2912e12a\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов
ERROR! FilePath: C:\Windows\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_51f7808a2912e12a\InputSwitch.dll : cant patch this dll!
Успешно обработано 1 файлов; не удалось обработать 0 файлов
обработанный файл: C:\Windows\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_51f7808a2912e12a\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов
обработанный файл: C:\Windows\WinSxS\wow64_microsoft-windows-inputswitch_31bf3856ad364e35_10.0.22621.1_none_51f7808a2912e12a\InputSwitch.dll
Успешно обработано 1 файлов; не удалось обработать 0 файлов
Патч завершился с ошибками. Это есть не добрый знак. Попытайтесь откатить изменения с помощью "python offPatch.py"`

Version - 22H2;
OS Assembly - 22621.521;
Release - Windows 11 Pro;

Any chance for Windows 11 version?

Hello!

Windows 11 have even more annoying input switch animation. It plays hiding animation no matter how fast you switch the input.

Is there any chance for Windows 11 support, please?

Here a screenshot:
language_switch

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.