#RAMSAN
bind Listbox <KeyPress> {
    tkListboxKeyPress %W %A
}

bind Listbox <1> "+ focus %W"

#RAMSAN
proc tkListboxKeyPress {w key} {
    global tkPriv

    if { $key == "" } { return }
    append tkPriv(ListboxAccel,$w) [string tolower $key]
    set s [$w size]
    set curr [$w index anchor]
    incr curr
    set found 0
    for { set i $curr } { $i < $s } { incr i } {
	set tryfile [string tolower [$w get $i]]
	if { [string match $tkPriv(ListboxAccel,$w)* $tryfile] } {
	    set found 1
	    break
	}
    }
    if { !$found } {
	for { set i 0 } { $i < $curr } { incr i } {
	    set tryfile [string tolower [$w get $i]]
	    if { [string match $tkPriv(ListboxAccel,$w)* $tryfile] } {
		set found 1
		break
	    }
	}
    }
    if { $found } {
	$w sel clear 0 end
	$w sel set $i
	$w sel anchor $i
	$w activate $i
	$w see $i
    }
    catch {
	after cancel $tkPriv(ListboxAccel,$w,afterId)
    }
    set tkPriv(ListboxAccel,$w,afterId) [after 500 tkListboxKeyPress_Reset $w]
}
proc tkListboxKeyPress_Reset {w} {
    global tkPriv

    catch {unset tkPriv(ListboxAccel,$w)}
}

#RAMSAN adding
catch {
    bind all <ISO_Left_Tab> {tkTabToWindow [tk_focusPrev %W]}
}

proc LoadGidAddons {} {
}