US AltGr International Keyboard for Android
This package contains additional layout files for physical keyboards (i.e. USB, Bluetooth) to enable the "AltGr" variant of the US International keyboard layout on Android.
These layouts are also known as "us altgr-intl" or "US Extended".
The Layouts
The layouts are based on the existing English (US International) layouts, with the following changes:
- All key combinations defined in English (US) behave like in English (US).
- International characters conflicting with English (US) have been moved to require AltGr.
- Affected keys: ` and 6.
In case of the Pixel C variant, the following additional changes were done:
- ² has been moved to AltGr-Ctrl-3 as AltGr-Ctrl-2 is already taken.
- International characters conflicting with English (US) that use AltGr (the ... key) have been moved to require Ctrl.
- Affected keys: 1, 2, 3, 6, O, P, =.
English (US AltGr International)
English (US AltGr International; Pixel C)
Compiling & Installing
android update project -p .
ant debug
adb install bin/USAltGrIntl-debug.apk
In case of a Pixel C, additionally run one of:
adb shell pm disable-user com.android.dragonkeyboard
After that, to to Settings / Language & input / Physical keyboard and select the keyboard layouts from this package. They will show up as layouts provided by "US AltGr International External Keyboard Layout".
Pixel C users: to go back to using the layouts included with the device, run one of:
adb shell pm enable com.android.dragonkeyboard
Compiling & Installing on the device
Termux users who are comfortable with installing from "unknown sources" can now compile and install on the device (note that this is substantially less secure, at the very least make sure no other apps are running):
./compile-and-install-from-termux.sh
In case this shows a "Not installed" error, this may indicate a need to remove the already installed version first from the system settings.
Unfortunately this procedure does not support the Pixel C; above adb shell
command absolutely must be run from a computer connected via USB first.
Adding Your Own
To add a custom layout:
- Download one of the existing layout files from AOSP or Pixel C.
- Edit and rename the file as needed. Some ideas:
- You can change the symbols on a key by simply editing the
key
blocks in the file. Should be quite self-explaining. - You can remap/swap keys by adding lines of the sort
map key <scancode> <keyname>
, where the scancode and keyname come from Generic.kl.
- You can change the symbols on a key by simply editing the
- Save it below
res/raw/
in this repository. - Duplicate and edit one of the existing entries below keyboard_layouts.xml according to the new file name.
- Duplicate and edit one of the existing entries in strings.xml according to the new file name.
- Compile and install as above.
Copyright
See the LICENSE
file.
Contributing
See the CONTRIBUTING.md
file.
Disclaimer
This is not an official Google product.