View this: hxxp://data.zx2c4.com/galaxy-relay-keyboard-map.jpg
The file /system/usr/keylayout/sec_keypad.kl contains correlations of keycodes and keychars. It turns out JuiceSSH interprets ALT_LEFT as console alt, ALT_RIGHT as Fn, and CTRL_LEFT as console ctrl. So in that file, we want to remap ALT_LEFT to ALT_RIGHT, and then remap the MAIL and CHAT keys to CTRL_LEFT and ALT_LEFT respectively:
key 56 ALT_RIGHT WAKE_DROPPED key 155 CTRL_LEFT WAKE_DROPPED key 429 ALT_LEFT WAKE_DROPPED key 217 META_LEFT WAKE_DROPPED
Here's a command listing of how I enable this using adb:
zx2c4@thinkpad ~ $ adb shell shell@android:/ $ su root@android:/ # mount -o rw,remount /system root@android:/ # wget -O /system/usr/keylayout/sec_keypad.kl hxxp://data.zx2c4.com/sec_keypad_modified.kl root@android:/ # reboot
Remember to change "hxxp" in this post; as a new member of XDA, I'm not allowed to post links.