Fixed "uninitialised errors in hash element" bug

This commit is contained in:
Duncan Ferguson 2013-12-31 11:18:46 +00:00
parent 6aca350f8b
commit e825bc17ca
2 changed files with 3 additions and 2 deletions

View file

@ -3,6 +3,7 @@
- Add in key shortcut for username macro (ALT-u)
- Add in key shortcut for local hostname macro (ALT-l)
- Fixed a bug with 'show history' key shortcut
- Fixed "uninitialised errors in hash element" bug [clusterssh support-requests:#38]
2013-04-16 Duncan Ferguson <duncan_ferguson@user.sf.net> - v4.02_01
- Refactured file loading code

View file

@ -291,7 +291,7 @@ sub load_keyboard_map() {
# try to associate $keyboard=X11->GetKeyboardMapping table with X11::Keysyms
foreach my $i ( 0 .. $#keyboard ) {
for my $modifier ( 0 .. 3 ) {
if ( defined( $keycodetosym{ $keyboard[$i][$modifier] } ) ) {
if ( defined( $keyboard[$i][$modifier] ) && defined( $keycodetosym{ $keyboard[$i][$modifier] } ) ) {
# keyboard layout contains the keycode at $modifier level
if (defined(
@ -328,7 +328,7 @@ sub load_keyboard_map() {
else {
# we didn't get the code from X11::Keysyms
if ( $keyboard[$i][$modifier] != 0 ) {
if ( defined( $keyboard[$i][$modifier] ) && $keyboard[$i][$modifier] != 0 ) {
# ignore code=0
logmsg( 2, "Unknown keycode ", $keyboard[$i][$modifier] );