AutoHotKey scripts for SuperMemo

From Pleasurable Learning
Jump to navigation Jump to search

Here I will be compiling useful AutoHotKey scripts for SuperMemo along with my suggested key binding.

Highlight selected text [ctrl+H]

SuperMemo does not offer a direct keyboard shortcut for highlighting. This script automates the process of highlighting via commander. Binding: {{#switch:ctrl | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = Ctrl }}{{#if:H|+{{#switch:h | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = H }}}}{{#if:|+{{#switch:{{{3}}} | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = {{{3}}} }}}}{{#if:|+{{#switch:{{{4}}} | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = {{{4}}} }}}}{{#if:|+{{#switch:{{{5}}} | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = {{{5}}} }}}}{{#if:|+{{#switch:{{{6}}} | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = {{{6}}} }}}}{{#if:|+{{#switch:{{{7}}} | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = {{{7}}} }}}}{{#if:|+{{#switch:{{{8}}} | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = {{{8}}} }}}}{{#if:|+{{#switch:{{{9}}} | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = {{{9}}} }}}}{{#if:|+{{#switch:{{{10}}} | caps lock = Caps Lock | shift = Shift | enter = Enter | cmd = Cmd | command = Command | opt = Opt | option = Option | tab = Tab | backspace = ← Backspace | win = Win | menu = Menu | up = ↑ | down = ↓ | left = ← | right = → | * | asterisk = * | # | hash = # | colon = : | pipe = | | semicolon = ; | equals = =

| l-up | l up = L↑ | l-down | l down = L↓ | l-left | l left = L← | l-right | l right = L→ | l-ne | l ne = L↗ | l-se | l se = L↘ | l-nw | l nw = L↖ | l-sw | l sw = L↙ | r-up | r up = R↑ | r-down | r down = R↓ | r-left | r left = R← | r-right | r right = R→ | r-ne | r ne = R↗ | r-se | r se = R↘ | r-nw | r nw = R↖ | r-sw | r sw = R↙ | #default = {{{10}}} }}}}{{#if:|}}

; highlight selected text
^H::
{
   send, ^{Enter}
   send, highlighter font
   send, {Enter}
}