Compare commits

..

No commits in common. "master" and "v2.0" have entirely different histories.
master ... v2.0

27 changed files with 27 additions and 707 deletions

View File

@ -10,39 +10,21 @@ You've probably noticed that when you switch from an ISO keyboard to an ANSI key
For Windows, you just have to follow the following steps for installation and use. For Windows, you just have to follow the following steps for installation and use.
* **Installation and Use:** * **Installation and Use:**
* Download the package [ansi-gli-2.7.zip](https://drive.proton.me/urls/A0BF0XCXHR#5zvMXkiswOZf). * Download the package [ansi-gli-2.0.zip](https://github.com/q3aql/ansi-gli/releases/download/v2.0/ansi-gli-2.0.zip)
* Unzip the package. * Unzip the package.
* Run `ansi-gli_x86.exe` (for Windows 32-bits) or `ansi-gli_x86_64.exe` (for Windows 64-bits). * Run `ansi-gli_86.exe` (for Windows 32-bits) or `ansi-gli_86_64.exe` (for Windows 64-bits).
* **Optional**: If you want CapsLock disabled, run `ansi-gli-nocapslock_x86.exe` or `ansi-gli-nocapslock_x86_64.exe`. * You will see the app icon on the tray. ([Image](https://github.com/q3aql/ansi-gli/blob/master/images/ansi-gli-tray.png))
* You will see the app icon on the tray. ([Image](images/ansi-gli-tray.png))
* You can now use the key combinations. * You can now use the key combinations.
List of combinations: List of combinations:
- Alt + z = < - Alt + Z = <
- Alt + x = > - Alt + X = >
- AltGr + Shift (Left) + z = < - AltGr + Shift (Left) + Z = <
- AltGr + Shift (Left) + x = > - AltGr + Shift (Left) + X = >
- AltGr + z = < - AltGr + Z = <
- AltGr + x = > - AltGr + X = >
- Alt + - = ?
- Alt + + = ¿
- Alt + c = ?
- Alt + v = ¿
- Alt + ' = \
- Win + Esc = \
- Win + Alt = AltGr (for keyboards without AltGr key as SK71/SK64)
- CapsLock = Shift (with nocapslock version)
German/French configuration extra key combinations:
- Alt + y = <
- AltGr + Shift (Left) + y = <
- AltGr + y = <
- Alt + w = <
- AltGr + Shift (Left) + w = <
- AltGr + w = <
### How to fix on Linux: ### How to fix on Linux:
@ -50,34 +32,10 @@ In most Linux distributions, the keys necessary to type these symbols are alread
In my case, using Ubuntu & Debian and setting the keyboard as Spanish ISO, you can write the symbol "<" and ">" with the following combinations natively: In my case, using Ubuntu & Debian and setting the keyboard as Spanish ISO, you can write the symbol "<" and ">" with the following combinations natively:
- AltGr + Shift (Left) + z = < - AltGr + Shift (Left) + Z = <
- AltGr + Shift (Left) + x = > - AltGr + Shift (Left) + X = >
- AltGr + Shift (Right) + z = < - AltGr + Shift (Right) + Z = <
- AltGr + Shift (Right) + x = > - AltGr + Shift (Right) + X = >
If you want to add more combinations or the ones mentioned do not work for you, you can follow these steps:
* Install `autokey` for Linux ([from here](https://github.com/autokey/autokey/releases)).
* Install `Python3` (Installed by default on many Linux distributions).
* Install the command `make` (`sudo apt-get install make` on Ubuntu/Debian).
* Download the package [ansi-gli-2.7.zip](https://drive.proton.me/urls/A0BF0XCXHR#5zvMXkiswOZf).
* Unzip the package.
* Inside the `linux` folder, open a terminal and type the command: `make install`.
* Run `autokey` (It is recommended to configure it to start on login).
Now, you can use the following additional key combinations:
- Alt + z = <
- Alt + x = >
- Alt + w = <
- Alt + y = <
- Alt + Esc = \
- Alt + - = ?
- Alt + + = ¿
- Alt + c = ?
- Alt + v = ¿
- Win = AltGr (with win-to-altgr_xmodmap.sh script)
- CapsLock = Shift (with disable-caplock_xmodmap.sh script)
### How to fix on Mac: ### How to fix on Mac:
@ -85,13 +43,12 @@ I don't know and I don't care.
### How to compile from source: ### How to compile from source:
* First, install [AutoHoyKey](https://www.autohotkey.com/). * First, install [AutoHoyKey](https://www.autohotkey.com/).
* Then, download the source from here. * Then, download the source from here.
* In the directory `src`, you have `ansi-gli.ahk`. Right click. * In the directory `src`, you have `ansi-gli.ahk`. Right click.
* Choose `Compile Script`. ([Image](images/ansi-gli-compile.png)) * Choose `Compile Script`. ([Image](https://github.com/q3aql/ansi-gli/blob/master/images/ansi-gli-compile.png))
### External links: ### External links:
* [AutoHotKey homepage](https://www.autohotkey.com/) * [AutoHotKey homepage](https://www.autohotkey.com/)
* [AutoHotKey documentation](https://www.autohotkey.com/docs/AutoHotkey.htm) * [AutoHotKey documentation](https://www.autohotkey.com/docs/AutoHotkey.htm)
* [autokey Github](https://github.com/autokey/autokey)

View File

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -1,35 +0,0 @@
################################################
# ANSI-GLI - ANSI Greater & Less in ISO #
# #
# Author: q3aql #
# Contact: q3aql@protonmail.ch #
# License: GPL v2.0 #
################################################
Version v2.7
* Installation steps:
1 - Install 'autokey' --> https://github.com/autokey/autokey/releases/
2 - Install 'python3' --> Installed by default on many Linux distributions.
3 - Inside the 'linux' folder, open a terminal and type the command:
$ make install
4 - Run autokey (It is recommended to configure it to start on login).
* Additional steps (Map AltGr on Win-Key):
1 - If you use a keyboard without AltGr key (as SK71/SK64), you can use with
the 'win-to-altgr_xmodmap.sh' script running the following commands:
$ chmod +x win-to-altgr_xmodmap.sh
$ ./win-to-altgr_xmodmap.sh
2 - If you want restore the config, run again the same script.
3 - If you want the permanent config, load the script to auto-startup apps.
* Additional steps (Disable CapsLock):
1 - If you prefer use the keyboard without CapsLock (only Shift), you can use
the 'disable-caplock_xmodmap.sh' script running the following commands:
$ chmod +x disable-caplock_xmodmap.sh
$ ./disable-caplock_xmodmap.sh
2 - If you want restore the config, run again the same script.
3 - If you want the permanent config, load the script to auto-startup apps.

View File

@ -1,13 +0,0 @@
############################################
# Installing ansi-60-keyboard combinations #
############################################
install:
mkdir -p ~/.config/autokey/data/
cp -rfv ansi-60-keyboard ~/.config/autokey/data/
autokey &
uninstall:
rm -rfv ~/.config/autokey/data/
autokey &

View File

@ -1,30 +0,0 @@
{
"usageCount": 0,
"omitTrigger": false,
"prompt": false,
"description": "alt-c",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "c",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,30 +0,0 @@
{
"usageCount": 0,
"omitTrigger": false,
"prompt": false,
"description": "alt-less",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "-",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,30 +0,0 @@
{
"usageCount": 0,
"omitTrigger": false,
"prompt": false,
"description": "alt-plus",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "+",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,30 +0,0 @@
{
"usageCount": 0,
"omitTrigger": false,
"prompt": false,
"description": "alt-v",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "v",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,30 +0,0 @@
{
"usageCount": 0,
"omitTrigger": false,
"prompt": false,
"description": "alt-w",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "w",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,30 +0,0 @@
{
"usageCount": 0,
"omitTrigger": false,
"prompt": false,
"description": "alt-x",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "x",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,30 +0,0 @@
{
"usageCount": 0,
"omitTrigger": false,
"prompt": false,
"description": "alt-y",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "y",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,30 +0,0 @@
{
"usageCount": 0,
"omitTrigger": false,
"prompt": false,
"description": "alt-z",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "z",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,30 +0,0 @@
{
"usageCount": 43,
"omitTrigger": false,
"prompt": false,
"description": "backslash",
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"hotkey": {
"hotKey": "<escape>",
"modifiers": [
"<alt>"
]
},
"modes": [
3
],
"showInTrayMenu": false,
"filter": {
"regex": null,
"isRecursive": false
},
"type": "script",
"store": {}
}

View File

@ -1,23 +0,0 @@
{
"usageCount": 0,
"abbreviation": {
"wordChars": "[\\w]",
"abbreviations": [],
"immediate": false,
"ignoreCase": false,
"backspace": true,
"triggerInside": false
},
"modes": [],
"title": "ansi-60-keyboard",
"hotkey": {
"hotKey": null,
"modifiers": []
},
"filter": {
"regex": null,
"isRecursive": false
},
"type": "folder",
"showInTrayMenu": false
}

View File

@ -1,2 +0,0 @@
# Enter script code
keyboard.send_keys("?")

View File

@ -1,2 +0,0 @@
# Enter script code
keyboard.send_keys("?")

View File

@ -1,2 +0,0 @@
# Enter script code
keyboard.send_keys("¿")

View File

@ -1,2 +0,0 @@
# Enter script code
keyboard.send_keys("¿")

View File

@ -1,2 +0,0 @@
#Enter script code
keyboard.send_keys("<")

View File

@ -1,2 +0,0 @@
#Enter script code
keyboard.send_keys(">")

View File

@ -1,2 +0,0 @@
#Enter script code
keyboard.send_keys("<")

View File

@ -1,2 +0,0 @@
#Enter script code
keyboard.send_keys("<")

View File

@ -1,2 +0,0 @@
#Enter script code
keyboard.send_keys("\\")

View File

@ -1,29 +0,0 @@
#!/bin/bash
##################################
# Script to disable CapsLock #
# #
# Author: q3aql@protonmail.ch #
##################################
# Variables
xmodmap_config_dir=/tmp/.disable-capslock
xmodmap_config_file=${xmodmap_config_dir}/capslock.key
# Check dir and create/restore config
mkdir -p ${xmodmap_config_dir}
if [ -f ${xmodmap_config_file} ] ; then
echo "* Restoring original function of CapsLock..."
sleep 2
restore_key=$(cat ${xmodmap_config_file})
xmodmap -e "keycode ${restore_key} = Caps_Lock"
rm -rf ${xmodmap_config_file}
echo "* Restored!"
else
echo "* Creating mapping of CapsLock to Shift..."
sleep 2
capslock_key_detect=$(xmodmap -pke | grep Caps_Lock | tr -s " " | grep keycode | head -1 | cut -d " " -f 2)
echo ${capslock_key_detect} > ${xmodmap_config_file}
xmodmap -e "keycode ${capslock_key_detect} = Shift_L"
echo "* Created!"
fi

View File

@ -1,29 +0,0 @@
#!/bin/bash
######################################
# Script to map Win key to AltGr key #
# #
# Author: q3aql@protonmail.ch #
######################################
# Variables
xmodmap_config_dir=/tmp/.win-altgr
xmodmap_config_file=${xmodmap_config_dir}/super-key.key
# Check dir and create/restore config
mkdir -p ${xmodmap_config_dir}
if [ -f ${xmodmap_config_file} ] ; then
echo "* Restoring original function of Win-Key..."
sleep 2
restore_key=$(cat ${xmodmap_config_file})
xmodmap -e "keycode ${restore_key} = Super_L"
rm -rf ${xmodmap_config_file}
echo "* Restored!"
else
echo "* Creating mapping of Win-Key to AltGr-Key..."
sleep 2
win_key_detect=$(xmodmap -pke | grep Super_L | tr -s " " | grep keycode | head -1 | cut -d " " -f 2)
echo ${win_key_detect} > ${xmodmap_config_file}
xmodmap -e "keycode ${win_key_detect} = ISO_Level3_Shift"
echo "* Created!"
fi

View File

@ -1,133 +0,0 @@
;
; ################################################
; # ANSI-GLI - ANSI Greater & Less in ISO #
; # #
; # Author: q3aql #
; # Contact: q3aql@protonmail.ch #
; # License: GPL v2.0 #
; ################################################
; Version v2.7
;
; You've probably noticed that when you switch from an ISO keyboard
; to an ANSI keyboard, the "<" and ">" keys are missing. When you
; configure an ANSI keyboard as ISO (for example in Spanish), you can
; use it in the same way as before, but those symbols are the only ones
; that you cannot type, so this script will solve the problem.
;
; Map the Alt + Z keys to show the "<" symbol
!z::
Send, <
return
;
; Map the Alt + X keys to show the ">" symbol
!x::
Send, >
return
;
; Map the AltGr + Shift (Left) + Z keys to show the "<" symbol
<^>!+z::
Send, <
return
;
; Map the AltGr + Shift (Left) + X keys to show the ">" symbol
<^>!+x::
Send, >
return
;
; Map the AltGr + Z keys to show the "<" symbol
<^>!z::
Send, <
return
;
; Map the AltGr + Z keys to show the ">" symbol
<^>!x::
Send, >
return
;
; If you use a 60% Keyboard, maybe need the following combinations:
;
; Map the AltGr + ' keys to show the "\" symbol (Spanish & Italian ISO config)
<^>!'::
Send, \
return
;
; Map the AltGr + ¡ keys to show the "~" symbol (Spanish ISO config)
;<^>!¡::
;Send, ~
;return
;
; Map the AltGr + - keys to show the "\" symbol (ANSI & UK ISO config)
<^>!-::
Send, \
return
;
; Map the AltGr + Esc keys to show the "\" symbol
<^>!*Escape::
Send, \
return
;
; German and French configuration extra key combinations
<^>!+w::
Send, <
return
;
<^>!w::
Send, <
return
;
!w::
Send, <
return
;
!y::
Send, <
return
;
<^>!+y::
Send, <
return
;
<^>!y::
Send, <
return
;
; Map Win + Alt to send AltGr command (for SK71 and SK64 keyboards)
LWin & LAlt::RAlt
return
;
; Map Alt + - to show ? simbol (for SK71 keyboard)
!-::
Send, ?
return
;
; Map Alt + '+' to show ¿ simbol (for SK71 keyboard)
LAlt & +::
Send, ¿
return
;
; Map Alt + c to show ? simbol (for SK71 keyboard)
!c::
Send, ?
return
;
; Map Alt + v to show ¿ simbol (for SK71 keyboard)
!v::
Send, ¿
return
;
; Map Alt + ' to show blacklash
!'::
Send, \
return
;
; Map Win + Esc to show blacklash
LWin & Escape::
Send, \
return
;
; Disable CapsLock (map CapsLock to Shift)
SetCapsLockState, AlwaysOff
CapsLock::LShift
return
;

View File

@ -2,126 +2,39 @@
; ################################################ ; ################################################
; # ANSI-GLI - ANSI Greater & Less in ISO # ; # ANSI-GLI - ANSI Greater & Less in ISO #
; # # ; # #
; # Author: q3aql # ; # Autor: q3aql #
; # Contact: q3aql@protonmail.ch # ; # Contact: q3aql@protonmail.ch #
; # License: GPL v2.0 # ; # Licencia: GPL v2.0 #
; ################################################ ; ################################################
; Version v2.7 ; Version v2.0
;
; You've probably noticed that when you switch from an ISO keyboard
; to an ANSI keyboard, the "<" and ">" keys are missing. When you
; configure an ANSI keyboard as ISO (for example in Spanish), you can
; use it in the same way as before, but those symbols are the only ones
; that you cannot type, so this script will solve the problem.
; ;
; Map the Alt + Z keys to show the "<" symbol ; Map the Alt + Z keys to show the "<" symbol
!z:: !z::
Send, < Send, <
return return
; ;
; Map the Alt + X keys to show the ">" symbol ;Map the Alt + X keys to show the ">" symbol
!x:: !x::
Send, > Send, >
return return
; ;
; Map the AltGr + Shift (Left) + Z keys to show the "<" symbol ;Map the AltGr + Shift (Left) + Z keys to show the "<" symbol
<^>!+z:: <^>!+z::
Send, < Send, <
return return
; ;
; Map the AltGr + Shift (Left) + X keys to show the ">" symbol ;Map the AltGr + Shift (Left) + X keys to show the ">" symbol
<^>!+x:: <^>!+x::
Send, > Send, >
return return
; ;
; Map the AltGr + Z keys to show the "<" symbol ;Map the AltGr + Z keys to show the "<" symbol
<^>!z:: <^>!z::
Send, < Send, <
return return
; ;
; Map the AltGr + Z keys to show the ">" symbol ;Map the AltGr + Z keys to show the ">" symbol
<^>!x:: <^>!x::
Send, > Send, >
return return
;
; If you use a 60% Keyboard, maybe need the following combinations:
;
; Map the AltGr + ' keys to show the "\" symbol (Spanish & Italian ISO config)
<^>!'::
Send, \
return
;
; Map the AltGr + ¡ keys to show the "~" symbol (Spanish ISO config)
;<^>!¡::
;Send, ~
;return
;
; Map the AltGr + - keys to show the "\" symbol (ANSI & UK ISO config)
<^>!-::
Send, \
return
;
; Map the AltGr + Esc keys to show the "\" symbol
<^>!*Escape::
Send, \
return
;
; German and French configuration extra key combinations
<^>!+w::
Send, <
return
;
<^>!w::
Send, <
return
;
!w::
Send, <
return
;
!y::
Send, <
return
;
<^>!+y::
Send, <
return
;
<^>!y::
Send, <
return
;
; Map Win + Alt to send AltGr command (for SK71 and SK64 keyboards)
LWin & LAlt::RAlt
return
;
; Map Alt + - to show ? simbol (for SK71 keyboard)
!-::
Send, ?
return
;
; Map Alt + '+' to show ¿ simbol (for SK71 keyboard)
LAlt & +::
Send, ¿
return
;
; Map Alt + c to show ? simbol (for SK71 keyboard)
!c::
Send, ?
return
;
; Map Alt + v to show ¿ simbol (for SK71 keyboard)
!v::
Send, ¿
return
;
; Map Alt + ' to show blacklash
!'::
Send, \
return
;
; Map Win + Esc to show blacklash
LWin & Escape::
Send, \
return
;