But you must add it to console.lua to function enableChat() or disableChat() (where you use bind function).
Because you want this only when chat is distabled, so you must delete this functions from interface.lua.
Now your binds functions from disableChat() is empty/do nothing.
So I need to...
function enableChat()
g_keyboard.unbindKeyPress("Shift+W")
g_keyboard.unbindKeyPress("Shift+D")
g_keyboard.unbindKeyPress("Shift+S")
g_keyboard.unbindKeyPress("Shift+A")
and
function disableChat()
g_keyboard.bindKeyPress('Shift+W', function() g_game.turn(North) changeWalkDir(North) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+D', function() g_game.turn(East) changeWalkDir(East) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+S', function() g_game.turn(South) changeWalkDir(South) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+A', function() g_game.turn(West) changeWalkDir(West) end, gameRootPanel)
and remove the lines:
g_keyboard.bindKeyPress('Shift+W', function() g_game.turn(North) changeWalkDir(North) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+D', function() g_game.turn(East) changeWalkDir(East) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+S', function() g_game.turn(South) changeWalkDir(South) end, gameRootPanel)
g_keyboard.bindKeyPress('Shift+A', function() g_game.turn(West) changeWalkDir(West) end, gameRootPanel)
from interface.lua to only work on console.lua?