Removed obsolete global variables

Recent cleanups obsoleted 'maxrows' and 'maxcolumns'.

The 'keyboard' variable was being returned from one function but
none of the callers used the return value. Also the variable was
never assigned to after initialization, so it didn't contain useful
information anyway.
Made it clearer that 'encryptiontypes' is read-only

Use a tuple instead of a list as its type. Don't use the "global"
keyword: that is only necessary when a global variable might be
assigned to from inside a function, it is unnecessary for reading.