+# Clear screen
+clear
+
+# Define charfile path
+CHARFILE=$CHARDIR/charfiles/$1
+
+# Define length of shortcut
+LENGTH=$(cat $CHARFILE | cut -f 1 -d ',' -s | wc -L | cut -b 1)
+
+# Main program
+while :
+do
+ # Put charfile into table, showing only the shortcuts below the divider in the charfile
+ cat $CHARFILE | grep -A 100 - | tail -n +2 | column -t --output-separator ' | ' --separator ','
+
+ # Automatically enter input
+ read -N $LENGTH INPUT
+
+ # This can definately be simplifed, but it works fine
+ LINENUMBER=$(cut -f 1 -d ',' -s $CHARFILE | grep -wn $INPUT | cut -d : -f 1)
+ OUTPUT=$(cut -f 2 -d ',' -s $CHARFILE | head -$LINENUMBER | tail +$LINENUMBER)
+
+ # Clear screen
+ clear
+
+ # Copy output to clipboard
+ echo $OUTPUT | xclip -selection clipboard
+done
+
+fi