All Projects → zk-phi → ewow

zk-phi / ewow

Licence: other
Use Emacs command (almost) everywhere

Programming Languages

autohotkey
350 projects

Labels

Projects that are alternatives of or similar to ewow

Fun
Small fun scripts
Stars: ✭ 22 (-58.49%)
Mutual labels:  ahk
AutoUpdateHosts
一键下载、更新 Windows Hosts 文件,便于常见网络访问
Stars: ✭ 15 (-71.7%)
Mutual labels:  ahk
FGO-AHK
FGO的AHK宏脚本:自定义流程刷本(含教程,主要用于3T速刷),抽池子、搓丸子……仅支持安卓模拟器FGO国服。
Stars: ✭ 77 (+45.28%)
Mutual labels:  ahk
destiny-macros
A collection of Destiny 2 macros built with AutoHotKey
Stars: ✭ 24 (-54.72%)
Mutual labels:  ahk
illustrator-shortcuts
collection of scripts and shortcuts for illustrator
Stars: ✭ 38 (-28.3%)
Mutual labels:  ahk
AHK-generator
A single page website to provide a UI for the 3 most common uses for AHK and defining custom hotstrings and hotkeys to trigger them
Stars: ✭ 23 (-56.6%)
Mutual labels:  ahk
POE-TradeMacro
Price checking script for Path of Exile.
Stars: ✭ 963 (+1716.98%)
Mutual labels:  ahk
ScriptUp
All AutoHotkey scripts under one process.
Stars: ✭ 19 (-64.15%)
Mutual labels:  ahk
static-hands
⌨️🤯 Stop moving hands, and start code fast ⚡⚡
Stars: ✭ 36 (-32.08%)
Mutual labels:  ahk
AHK MicMute
Control your microphone using keyboard and mouse hotkeys.
Stars: ✭ 67 (+26.42%)
Mutual labels:  ahk
CapsLockX
Operate the computer like a hacker! 像黑客一样操作电脑!
Stars: ✭ 111 (+109.43%)
Mutual labels:  ahk
Mercenaries-Hearthstone-game-bot
bot for hearthstone mercenaries mode
Stars: ✭ 59 (+11.32%)
Mutual labels:  ahk
YDL
A Simple GUI wrapper around yt-dlp for Windows using AHK
Stars: ✭ 18 (-66.04%)
Mutual labels:  ahk
AHKCommandPicker
An AutoHotkey (AHK) script that allows you to easily run AHK functions. Instead of having to remember what shortcut key maps to each of your AHK scripts, this displays a list of all your AHK functions and allows you to easily run them.
Stars: ✭ 50 (-5.66%)
Mutual labels:  ahk
VMR.ahk
AutoHotkey wrapper class for Voicemeeter's Remote API
Stars: ✭ 22 (-58.49%)
Mutual labels:  ahk
capslock-plus-plus
⌨Amazing, extendable, readable autohotkey scripts framework utilized by Capslock.
Stars: ✭ 77 (+45.28%)
Mutual labels:  ahk
metaKeyboard
turn a common keyboard into a 61-key keyboard for the keyboard shortcut fun like you, I'm a programer, I want to improve coding efficiency
Stars: ✭ 30 (-43.4%)
Mutual labels:  ahk
hotstring
Trigger a Hotstring through dynamic means with Autohotkey
Stars: ✭ 37 (-30.19%)
Mutual labels:  ahk
AHKShortcutLikeMac
An AHK Script for using keyboard shortcuts like MacOS on your Windows
Stars: ✭ 109 (+105.66%)
Mutual labels:  ahk
intuiter
Global productivity app for anyone who use Windows
Stars: ✭ 24 (-54.72%)
Mutual labels:  ahk

EWOW – Emacs Way of Operating Windows

Features

  • allows Emacs-like commands and keybinds (almost) everywhere in Windows
    • keyboard macros
    • prefix digit-argument
      • ex. C-3 C-n -> go 3 lines down
    • Emacs-style region selection (i.e. set-mark-command)
    • … etc

Usage

Install AutoHotKey_L, and run “ewow.ahk” then emacs commands are available. You can quit EWOW from tasktray icon.

Configuration

Abstract

EWOW is a set of AutoHotKey scripts :

fundamental.ahk
provides a bunch of functions and variables, that are used to implement emacs-like commands and keybinds
commands.ahk
provides basic emacs commands implementation
init.ahk
PUT YOUR SETTINGS HERE.
keybinds.ahk
provides the default keybinds

“ewow.ahk” just loads them in sequence. You can configure EWOW by writing AHK script in “init.ahk”, so that “ewow.ahk” will load it. Some recomended configurations are provided and commented-out in “init.ahk”, and you can uncomment to try them.

How To Write AHK Script ?

An AHK script basically consists of two parts :

  • auto-exec section
  • hotkey definitions

they must be in the order. That is, you CANNOT write auto-exec section after hotkey definitions.

auto-exec section

In auto-exec section, you can define define/call functions and set variables, like usual programming languages. Calling functions and setting variables are as easy as :

foo()      ; function call
bar = baz  ; set variable value

If you need to define functions to configure EWOW, please read AHK manuals.

You may also import other EWOW packages in auto-execution section :

#Include evil.ahk

hotkey definitions

Hotkey definitions are similar to keybinds in emacs. To rebind C-f key to forward_char command, you just need to add following to your “init.ahk”.

^f:: forward_char()

The letter ^ here indicates that f is modified by Ctrl key. Respectively + indicates Shift and ! indicates Alt. Default Keybinds are defined in “keybinds.ahk”.

You may also define conditional keybinds with #If directive :

#If !ignored_frame() && !cx
^f:: forward_char()
#If !ignored_frame() && cx
^f:: find_file()

The example above binds C-f to forward_char command, when C-x is not prefixed and the cursor is not in ignored_frames which is described later. If we are not in ignored_frames but C-x is prefixed, then C-f is bind to find_file command instead. Otherwise (when we are in “ignored_frames”), C-f is not bound. That is, Ctrl-f is sent to Windows normally.

Functions and Variables provided in fundamental.ahk

Following functions and variables are provided in “fundamental.ahk”. You may call or set them in “init.ahk” to do some configurations.

  • configurable variables
    ignored_frames
    a list of window-classes in which EWOW should be disabled. for example, we usually do not want get EWOW enabled in Emacs window.
  • read-only variables
    cx
    true when C-x is prefixed.
    mark
    true when the mark is active.
  • functions
    ignored_frame()
    return if we are in ignored_frames

Writing Extensions

If you are familiar with AHK, it is easy to write your own commands or packages. Because commands are just AHK functions, and a package is basically a set of commands and variables.

Though, there are some differences to be cared. PLEASE READ description below, before start writing your own extensions.

Functions and Variables Provided for Developers

  • functions
    send(str)
    a wrapper function of Send operation. PLEASE DO USE THIS instead of normal Send operation, so that sent keys are recorded in keyboard macros.
    add_hook(var, func)
    like add-hook in Emacs. available hooks are described later. var must be a name of hook variable, and func must be a name of a 0-ary function.
    remove_hook(var, func)
    inverse of add_hook.
    run_hooks(var)
    run hooks added to the hook variable var.
    alloc_tt()
    allocate an UID for tooltip and return it. when you use tooltip operation, PLEASE DO USE the ID provided by this function as WhichToolTip argument. there is no free_tt() function, so PLEASE DO REUSE the provided ID.
    read_char()
    steal a key event from keyboard and return it, without sending it to Windows nor invoking commands.
    set_mark()
    activate mark.
    reset_mark()
    deactivate mark.
  • read-only variables
    last_command
    the last key sequence sent to Windows.
    arg
    prefixed digit argument is stored as an integer.
  • hooks
    pre_command_hook
    hook which MUST BE CALLED manually at the beginning of command.
    post_command_hook
    hook which MUST BE CALLED manually at the end of command.
    after_change_hook
    hook which MUST BE CALLED manually just after changes.
    before_send_hook
    hook which automatically runs before sending keys to Windows. you may assume that the variable last_command is set to the key sequence being sent, in the hook.
    after_send_hook
    hook which automatically runs after sending keys to Windows.
    after_display_transition_hook
    hook which automatically runs when the active window is switched.

Things You MUST Do

  • use send() function instead of Send.
  • use alloc_tt() function when you use ToolTip.
  • call pre_command_hook, post_command_hook and after_change_hook from your commands manually. Your command may looks like :
    my_command()
    {
        run_hooks("pre_command_hook")
        do_something()
        run_hooks("post_command_hook")
    }
        
  • use local variables as well as you can, to save namespace.

Thigs You CAN Do

  • hook some functions with add_hook
    add_hook("pre_command_hook", "my_pkg_pre_command_function")
        
  • run some hooks with run_hoks
  • use read_char() function to steal a key input
  • read last_command and arg value

Known Limitations, Bugs

  • some commands are not recorded in keyboard macro
    • some commands are – commands that do not send keys to Windows
  • registers are not available for now
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].