@name Hi-Speed KeyBoard
@inputs CS:wirelink KB:wirelink
@outputs Key Str:string
@persist Old
@trigger 

#SOMETHING USEFUL

interval(10)

if(first())
{
    CS[2041] = 1
}

Key = KB["Memory",number]

CS:writeString(Key + "   ",0,0)

if(Key & Old != Key)
{
    if(Key == 18){}#ESC
    elseif(Key == 163){}#F1
    elseif(Key == 164){}#F2
    elseif(Key == 165){}#F3
    elseif(Key == 166){}#F4
    elseif(Key == 167){}#F5
    elseif(Key == 168){}#F6
    elseif(Key == 169){}#F7
    elseif(Key == 170){}#F8
    elseif(Key == 171){}#F9
    elseif(Key == 172){}#F10
    elseif(Key == 173){}#F11
    elseif(Key == 174){}#F12

    elseif(Key == 9){}#Tab
    elseif(Key == 13){}#Enter (The Num Pad One Too)
    elseif(Key == 127){Str = Str:left(Str:length()-1)}#Back Space
    elseif(Key == 144){}#Caps Lock
    elseif(Key == 154){}#Shift
    elseif(Key == 158){}#Ctrl
    elseif(Key == 160){}#Windows Key
    elseif(Key == 162){}#Context Menu Key
    elseif(Key == 174){}#`

    elseif(Key == 17){}#Up Arrow
    elseif(Key == 18){}#Down Arrow
    elseif(Key == 19){}#Left Arrow
    elseif(Key == 20){}#Right Arrow
    elseif(Key == 146){}#Caps Lock
    elseif(Key == 147){}#Insert
    elseif(Key == 148){}#Delete
    elseif(Key == 149){}#Home
    elseif(Key == 150){}#End
    elseif(Key == 151){}#Page Up
    elseif(Key == 152){}#Page Down
    elseif(Key == 153){}#Pause/Break

    elseif(Key == 128){Str += "0"}#Num 0
    elseif(Key == 129){Str += "1"}#Num 1
    elseif(Key == 130){Str += "2"}#Num 2
    elseif(Key == 131){Str += "3"}#Num 3
    elseif(Key == 132){Str += "4"}#Num 4
    elseif(Key == 133){Str += "5"}#Num 5
    elseif(Key == 134){Str += "6"}#Num 6
    elseif(Key == 135){Str += "7"}#Num 7
    elseif(Key == 136){Str += "8"}#Num 8
    elseif(Key == 137){Str += "9"}#Num 9
    elseif(Key == 138){Str += "/"}#Num /
    elseif(Key == 139){Str += "*"}#Num *
    elseif(Key == 140){Str += "-"}#Num -
    elseif(Key == 141){Str += "+"}#Num +
    elseif(Key == 143){Str += "."}#Num .
    elseif(Key == 145){}#Num Lock
    else
    {
        Str += toChar(Key)
    }
}

CS:writeString(Str + " ",0,1)
Old = Key
