Key mapping conflict in Celestia Explorer script

Report bugs, bug fixes and workarounds here.
Topic author
exadvent
Posts: 17
Joined: 26.06.2006
With us: 18 years 3 months

Key mapping conflict in Celestia Explorer script

Post #1by exadvent » 08.08.2006, 02:16

The scanner key mapping in Celestia Explorer is logical, but conflicts with the key mapping in Celestia. So if you are running Celestia Explorer you lose some of the Celestia functions. In my installation I made a quick and dirty workaround by simply remapping the Celestia Explorer functions to the keys that Celestia uses for spacecraft control. As Celestia Explorer is spacecraft control script these are not used by Celestia when Celestia Explorer is running. (I still lose the 1-9 planet selection)

Original code

Code: Select all

elseif(keypress == "L") then
      --[[ store currently selected object in log table ]]
      table.insert(starlog, gObject)
      nme = gObject:name()
      HeaderDisplay("Adding '" .. nme .. "' to sensor log", 4, false, 0, false)
      handled = true
   elseif(keypress == "l") then
      --[[  toggles Sensor and Sensor log display ]]
      if(gDisplayLog == true ) then
         gDisplayLog = false
         gConsoleType = sensorType
         gConsoleName = "SENSORS"
      else
         gDisplayLog = true
         gConsoleType = sensorLogType 
         gConsoleName = "SENSOR LOG"
      end
      handled = true


My fix

Code: Select all

elseif(keypress == "S") then
      --[[ store currently selected object in log table ]]
      table.insert(starlog, gObject)
      nme = gObject:name()
      HeaderDisplay("Adding '" .. nme .. "' to sensor log", 4, false, 0, false)
      handled = true
   elseif(keypress == "s") then
      --[[  toggles Sensor and Sensor log display ]]
      if(gDisplayLog == true ) then
         gDisplayLog = false
         gConsoleType = sensorType
         gConsoleName = "SENSORS"
      else
         gDisplayLog = true
         gConsoleType = sensorLogType 
         gConsoleName = "SENSOR LOG"
      end
      handled = true


I do not have the coding skills to create a better solution, does anyone else
have any ideas (using the "alt" key?)

This is such a great script that I hate to see any conflicts with the main Celestia program.

ps. I think that my remapping is logical and easy to use, I would be glad to post it if anyone is interested.
System:
Windows: Windows XP5.1
Memory (RAM): 512 MB
CPU Info: AMD Athlon(tm) 64 Processor 3200+
CPU Speed: 783.3 MHz
Display Adapters: NVIDIA GeForce FX 5200

Return to “Bugs”