[ZeroBrane Studio] Keyboard mapping error: attempt to index local 'G' (a nil value)

  • From: Tom Doan <tom_xyz@xxxxxxxxx>
  • To: "zerobrane@xxxxxxxxxxxxx" <zerobrane@xxxxxxxxxxxxx>
  • Date: Sun, 19 Jan 2014 06:01:08 -0800 (PST)

Hello, I am not able to change the key mapping. I added the lines below to my 
system user.lua and restarted, but pressing Escape still does nothing.

local G = ...
keymap[G.ID_EXIT] = "Escape"

When I ran the script, this was the error that was displayed in the output pane:

Program starting as '"C:\portable\ZeroBrane Studio\bin\lua.exe" -e 
"io.stdout:setvbuf('no'); require('mobdebug').loop('VAIO',8172)"'.
Program 'lua.exe' started in 'C:\portable\ZeroBrane Studio\myprograms' (pid: 
11168).
Debugging session started in 'C:\portable\ZeroBrane Studio\myprograms\'.
Debugging session completed (traced 0 instructions).
Program completed in 15.88 seconds (pid: 11168).
C:/portable/ZeroBrane Studio/cfg/user.lua:8: attempt to index local 'G' (a nil 
value)
stack traceback:
C:/portable/ZeroBrane Studio/cfg/user.lua: in main chunk

(Line 8 points to keymap[G.ID_EXIT] = "Escape")

This is a fresh install of ZeroBrane Studio (0.40; MobDebug 0.55) on Windows 
8.1 (64-bit). Please advise.


Thanks,
Tom

Other related posts: