I never explained it like that at all… okay let me try and explain further/again.
currently you're using the
key event. As shown on that wiki page when a key is pressed it will provide you with the key code of which key is pressed (a full list of key codes can be found
here). However in your config file you're storing the letter G, as you can see from that key codes image when the key G is pressed the key code 34 is returned to you through the key event, and as we know 34 and G are not the same, this is where your problem occurs. This is where the
char event comes into play for your specific problem. As stated every time a key is pressed there will be a key event, telling you the key code of which key was pressed, this is so you can know if keys such as control, backspace, arrow keys, etc., have been pressed; however with ComputerCraft when a key that has a graphical representation, for example a letter, a number, a symbol, has been pressed you will also receive a char event, this event will return the graphical representation of the key as opposed to a number.
Example:If you press the enter key you will get the following
Event: key
Param: 28
however if you press the g key you will get
Event: key
Param: 34
Event: char
Param: g
therefore knowing this, if you want to check if the key that was pressed, matches the key specified in the config file, you must listen for the char event, not the key event as you are currently doing.
EDIT: just incase you're unaware, on line 256 you have the following code
elseif event == "key" then
this is what I mean by you 'listening' for a key event.