https://github.com/jeffersonqin/ayase
๐ฅฅ Control everything by keyboard.
https://github.com/jeffersonqin/ayase
accessibility cpp csharp dotnet dotnet-core keyboard mouse mouse-simulations pinvoke uiautomation win32 win32api win32com wpf
Last synced: 2 months ago
JSON representation
๐ฅฅ Control everything by keyboard.
- Host: GitHub
- URL: https://github.com/jeffersonqin/ayase
- Owner: JeffersonQin
- License: mit
- Created: 2021-07-31T17:26:33.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2022-01-10T06:32:45.000Z (over 3 years ago)
- Last Synced: 2025-03-25T08:11:14.536Z (3 months ago)
- Topics: accessibility, cpp, csharp, dotnet, dotnet-core, keyboard, mouse, mouse-simulations, pinvoke, uiautomation, win32, win32api, win32com, wpf
- Language: C#
- Homepage:
- Size: 10 MB
- Stars: 69
- Watchers: 3
- Forks: 11
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ayase
[็ฎไฝไธญๆ | For Simplified Chinese version, please click here](README_zh-cn.md)
Ayase is a tool which can help you to control everything by keyboard. This is specifically designed for ~~lazy people like me~~ and blind people. It is known to all that in the most cases, we have to control the computer by **both** mouse **and** keyboard. However, the frequent switch for our hand between mice and keyboards would severely threaten the health of our wrists. Meanwhile, for blind people, though in most cases, it is convenient enough to use the screen readers to control elements on screen, most softwares cannot control both precisely and **swiftly**. You have to wait for the element or switch many times to find the element you want to control. With Ayase, these problems are all solved.
# Screenshots
Use Ayase to control Netease Music UWP:

Use Ayase to surf on the Internet:

# About Naming (Ayase)
I love Mitsukasa Ayase forever!
https://zh.moegirl.org.cn/ไธๅธ็ปซๆฟ
# Features
- Support high DPI, different DPI across multiple monitors, cross monitor display
- Support Chrome-based Apps (e.g. Github Desktop)
- Support Electron Apps (e.g. Visual Studio Code)
- Support WinForms, WPF, UWP (e.g. Netease Music UWP)
- Support the self-developed UI frameworks (e.g. Wechat & QQ of Tencent Inc.)
- Scanning of UI tree with high speed
- Support **pinyin** for Chinese (e.g. ็ฝๆไบ โ wyy / wangyiyun)
- Ignore upper and lower caseFor the discussion on accessibility development and speed optimization, please refer to my following articles. Finally, the implementation scheme I adopted is to use `C++` to invoke `Win32API / uiautomation.h` and compile into `dll` (dynamic link library). Then, I used `P/Invoke` in the `C# / WPF` project to use the library. In most cases, the performance was improved for about 80%.
- [.NET C# AutomationElement ่ทๅๆก้ขUIๅ ็ด ](https://gyrojeff.top/index.php/archives/NET-C-AutomationElement-%E8%8E%B7%E5%8F%96%E6%A1%8C%E9%9D%A2UI%E5%85%83%E7%B4%A0/)
- [.NET C# ๆๆ็บฟ็จๆฑ | ๅฟๅๆ่ฃ่ ](https://gyrojeff.top/index.php/archives/NET-C-%E6%89%8B%E6%92%95%E7%BA%BF%E7%A8%8B%E6%B1%A0-%E5%8E%BF%E5%9F%8E%E6%92%95%E8%A3%82%E8%80%85/)
- [.NET C# AutomationElement ๅ ้ๆข็ดข](https://gyrojeff.top/index.php/archives/NET-C-AutomationElement-%E5%8A%A0%E9%80%9F%E6%8E%A2%E7%B4%A2/)
- [.NET C# UIAutomationElement ่ทๅๆก้ขๅ ็ด ](https://gyrojeff.top/index.php/archives/NET-C-UIAutomationElement-%E8%8E%B7%E5%8F%96%E6%A1%8C%E9%9D%A2%E5%85%83%E7%B4%A0/)
- [.NET C# ้่ฟWin32API่ทๅ็ชๅฃๅๆงไปถ็ไฟกๆฏ](https://gyrojeff.top/index.php/archives/NET-C-%E9%80%9A%E8%BF%87Win32API%E8%8E%B7%E5%8F%96%E7%AA%97%E5%8F%A3%E5%8F%8A%E6%8E%A7%E4%BB%B6%E7%9A%84%E4%BF%A1%E6%81%AF/)
- [.NET C# ่ทๅๆก้ขUIๅ ็ด ๆป็ป](https://gyrojeff.top/index.php/archives/NET-C-%E8%8E%B7%E5%8F%96%E6%A1%8C%E9%9D%A2UI%E5%85%83%E7%B4%A0%E6%80%BB%E7%BB%93/)
- [.NET C# MSAA ่ทๅๆก้ขUIๅ ็ด ](https://gyrojeff.top/index.php/archives/NET-C-MSAA-%E8%8E%B7%E5%8F%96%E6%A1%8C%E9%9D%A2UI%E5%85%83%E7%B4%A0/)
- [.NET C# C++ ๆทท็ผ้ฎ้ข](https://gyrojeff.top/index.php/archives/NET-C-C-%E6%B7%B7%E7%BC%96%E9%97%AE%E9%A2%98/)Note that I do not have additional time and effort to translate those articles into English. Using translators can also understand the articles well. If you still have any questions or advice, you can contact me directly. You can find ways to contact me in my GitHub homepage. This is the first time I write `WPF / C#` this formally, so if you have any advice, please don't hesitate to raise issues or pull requests.
# Project Structure
```
.
โโโ Ayase # Ayase Project
โย ย โโโ AccessibilityBridge # P/Invoke bridge for .dll
โย ย โย ย โโโ GNativeIUIAutomationManager.cs
โย ย โย ย โโโ GNativeUIElement.cs
โย ย โโโ App.xaml
โย ย โโโ App.xaml.cs # Entrance
โย ย โโโ AssemblyInfo.cs
โย ย โโโ AutomationLib # Most of them are no longer used. Serve as alternatives
โย ย โย ย โโโ GAutomationManager.cs
โย ย โย ย โโโ GIUIAutomationManager.cs
โย ย โย ย โโโ GMSAAManager.cs
โย ย โย ย โโโ GRawUIManager.cs
โย ย โย ย โโโ GUIElement.cs
โย ย โย ย โโโ Wrapper # Wrapper for Win32API used in this section
โย ย โย ย โโโ ObjectIdentifiers.cs
โย ย โย ย โโโ RECT.cs
โย ย โย ย โโโ ReferenceIdentifiers.cs
โย ย โย ย โโโ Win32API.cs
โย ย โโโ Ayase.csproj
โย ย โโโ Ayase.csproj.user
โย ย โโโ HotkeyLib # Global hotkey wrapping
โย ย โย ย โโโ GHotKey.cs
โย ย โย ย โโโ GKeybdEvent.cs
โย ย โย ย โโโ VirtualKeys.cs
โย ย โโโ MouseLib # Mouse control wrapping
โย ย โย ย โโโ GMouse.cs
โย ย โโโ Properties
โย ย โย ย โโโ launchSettings.json
โย ย โโโ ScreenLib # Screen library wrapping
โย ย โย ย โโโ PrimaryScreen.cs
โย ย โโโ ThreadLib # Private thread pool
โย ย โย ย โโโ GThreadPool.cs
โย ย โโโ UI # UI
โย ย ย ย โโโ FormMaskWindow.xaml
โย ย ย ย โโโ FormMaskWindow.xaml.cs
โย ย ย ย โโโ MaskWindow.cs
โย ย ย ย โโโ NotationLabel.cs
โย ย ย ย โโโ ReuseWindow.cs
โย ย ย ย โโโ ScreenMaskWindow.xaml
โย ย ย ย โโโ ScreenMaskWindow.xaml.cs
โย ย ย ย โโโ SearchWindow.xaml
โย ย ย ย โโโ SearchWindow.xaml.cs
โย ย ย ย โโโ SettingsWindow.xaml
โย ย ย ย โโโ SettingsWindow.xaml.cs
โย ย ย ย โโโ WindowManager.cs # Windows scheduling
โโโ Ayase.Accessibility # dll project
โย ย โโโ Ayase.Accessibility.vcxproj
โย ย โโโ Ayase.Accessibility.vcxproj.filters
โย ย โโโ Ayase.Accessibility.vcxproj.user
โย ย โโโ GConstant.h # Some constants
โย ย โโโ GIUIAutomationManager.cpp # Main implementation
โย ย โโโ GIUIAutomationManager.h
โย ย โโโ GUIElement.cpp # Wrapping for data structure
โย ย โโโ GUIElement.h
โย ย โโโ dllmain.cpp
โย ย โโโ framework.h
โย ย โโโ pch.cpp
โย ย โโโ pch.h
โโโ Ayase.sln
```The TOC for generated project:
```
.
โโโ ...
โโโ Ayase.Accessibility.dll
โโโ <.net target>
โโโ ...
โโโ Ayase.exe
```# Dependencies
- `Microsoft.Toolkit.Uwp.Notifications`
- `Notifications.Wpf`
- `ToolGood.Words`# Usage
- Start UI Scanning: `Alt + CapLocks` (We would adjust the status of `CapLocks` automatically)
- Exit UI Scanning: `Esc`
- Next Element: `Tab`
- Previous Element: `Shift + Tab`
- Click the Selected Element: `Enter`
- Move the mouse to the Selected Element: `Shift + Enter`# TODO
Note: most modules have been completed but not released here due to license issues. I am now making effort to crafting new alternatives that are compatible with MIT license.
- Add voice module
- Add settings module
- Add support for control by `AWSD`
- Add pure mouse mode