Keyboard Short-Cuts For Orbit Lines
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Keyboard Short-Cuts For Orbit Lines
Hey there... I know it's possible to turn the entire orbit-line rendering on and off via the O key. But as far as I can tell, there is no keyboard shortcut to do it for specific orbit lines (planets, moons, etc.) which is kinda a buzz kill because, while flying through Celestia, in order to turn on, say, comet orbits for a moment - I have to toggle out of full screen mode and use the mouse and menu. Anyone know of a workaround? If not, consider this a feature request for keyboard short-cuts for specific orbit lines - maybe something simple like shift-comman-p for planets... shift-command-m for moons... and so one..
Thanks,
Steve
Thanks,
Steve
Steven Binder, Mac OS X 10.4.10
Steven,
It should be easy for you to add this to your version of Celestia. Just do the following: Start Xcode and open your Celestia project. Double-click on MainMenu.nib to open it in Interface Builder. You'll see a window with the Celestia main menu in it. Click successively on Display>Orbits>Comets to select that menu item. Choose 'Show Info' from the Interface Builder 'Tools' menu to open the 'NSMenuItem Info' window for the 'Comets' menu item. Use the 'Attributes' panel in the info window to specify a 'Keyboard Equivalent' (shortcut) and modifiers. Do this for each of the menu items you want to add keyboard shortcuts for. Then save the nib file, quit Interface Builder, rebuild the project in Xcode (no need to clean), and you should be in business.
- Hank
It should be easy for you to add this to your version of Celestia. Just do the following: Start Xcode and open your Celestia project. Double-click on MainMenu.nib to open it in Interface Builder. You'll see a window with the Celestia main menu in it. Click successively on Display>Orbits>Comets to select that menu item. Choose 'Show Info' from the Interface Builder 'Tools' menu to open the 'NSMenuItem Info' window for the 'Comets' menu item. Use the 'Attributes' panel in the info window to specify a 'Keyboard Equivalent' (shortcut) and modifiers. Do this for each of the menu items you want to add keyboard shortcuts for. Then save the nib file, quit Interface Builder, rebuild the project in Xcode (no need to clean), and you should be in business.
- Hank
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
NOTE TO ALL: my new Mac OS X build does include keyboard short-cuts for toggling specifc orbit lines (thanks again, Hank). It's a very cool way to stay in the program's reality...
http://www.celestiaproject.net/forum/viewtopic.php?t=7561
http://www.celestiaproject.net/forum/viewtopic.php?t=7561
Steven Binder, Mac OS X 10.4.10
-
- Posts: 835
- Joined: 27.09.2004
- With us: 20 years 2 months
- Location: Massachusetts, USA
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
BlindedByTheLight wrote:NOTE TO ALL: my new Mac OS X build does include keyboard short-cuts for toggling specifc orbit lines (thanks again, Hank). It's a very cool way to stay in the program's reality...
http://www.celestiaproject.net/forum/viewtopic.php?t=7561
Hello Steven,
On your download center, the last available is the Dirkpitt built... This one also have the shortcuts?
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
well, after hours of searching and probing the celestia-code i made a patch for the w32 and linux-source (not tested with linux yet).
the shortcuts are very easy and the complement to ther label-keys:
SHIFT+P - toggle planet-orbits
SHIFT+M - toggle moon-orbits
SHIFT+N - toggle spacecraft-orbits
i moved comet-labels and orbits to 'z' and 'SHIFT+Z'
SHIFT+W - toggle asteroid-orbits
SHIFT+Z - toggle comet-orbits
remember that you cannot turn off orbits on currently selected objects.
there is also a display-bug when you:
- turn off planet-orbits
- turn on moon-orbits
- deselect the planet
but thats not my fault
grab the .patch or w32-bin here:
http://www.purebytes.de/stuff/celestia/patches/
the shortcuts are very easy and the complement to ther label-keys:
SHIFT+P - toggle planet-orbits
SHIFT+M - toggle moon-orbits
SHIFT+N - toggle spacecraft-orbits
i moved comet-labels and orbits to 'z' and 'SHIFT+Z'
SHIFT+W - toggle asteroid-orbits
SHIFT+Z - toggle comet-orbits
remember that you cannot turn off orbits on currently selected objects.
there is also a display-bug when you:
- turn off planet-orbits
- turn on moon-orbits
- deselect the planet
but thats not my fault
grab the .patch or w32-bin here:
http://www.purebytes.de/stuff/celestia/patches/
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)
phoenix wrote:well, after hours of searching and probing the celestia-code i made a patch for the w32 and linux-source (not tested with linux yet).... grab the .patch or w32-bin here:
http://www.purebytes.de/stuff/celestia/patches/
Thanks a lot, Phoenix, it works correctly and is very nice-looking.
It's very useful for teaching and show needs, thanks again!
Andrea
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
New Keyboard Commands Altogether?
phoenix wrote:the shortcuts are very easy and the complement to ther label-keys:
SHIFT+P - toggle planet-orbits
SHIFT+M - toggle moon-orbits
SHIFT+N - toggle spacecraft-orbits
i moved comet-labels and orbits to 'z' and 'SHIFT+Z'
SHIFT+W - toggle asteroid-orbits
SHIFT+Z - toggle comet-orbits
I couldn't help but chuckle when I read this... as I'm sure you went through the same line of reasoning I did when deciding which keys to use to toggle orbit lines. I am, curious, however, what led you to your scheme.
Having not been with Celestia from the beginning, I get the sense that a lot of the keyboard short-cuts were not "Master Planned" out - but resulted from a growing hodge-podge of new feature additions. Which would explain why "P" toggles planet-labels but "A" does not toggle asteroid-labels (instead which is toggled by a small "w").
It seems like a lot of short-cuts have been shoe-horned in - with the ATTEMPT to make them logical but failing when other commands have "gotten to the key" first.
Like it seems as you did, I, too, had first contemplated following the established (though inconsistent) keyboard assignments and setting the new orbit lines keyboard short-cuts to match the already established keyboard shortcuts for the labels - but just adding a shift-key.
The problem with this is that making the shift key a mandatory part of the orbit-toggling process, that precludes the use of the small "w" and capital "W" convention for asteroids and comets - hence your solution to move to "z" and shift-"z" (though you quoted just a "w" above so I was a bit confused).
In any case, I chose a different tact. If I could have followed PRECISELY the previous established Turn-On-Labels Convention, I might have. Just might, however - for reasons I will eventually get to. Since I couldn't follow that convention, however, I thought...
"Rather than having to now jump to yet ANOTHER illogical and arbitrary assignment - namely moving comets now to shift-z - that will still require a novel memorization of a new short-cut, why not take this opportunity to wipe the slate clean and go back to a LOGICAL assignment?"...
shift-p for p-lanet orbits
shift-s for s-paceship orbits
shift-a for a-steroid orbits
shift-c for c-omet orbits
shift-m for m-oon oribts
Aside from the benefit of drawing a line in the sand and not moving further and further away from a logical keyboard assignment (and potentially making things yet MORE difficult for future additions), it had the ease-of-GUI benefit of requiring only ONE memorization...
shift+ the first letter of the orbit-name you are toggling
I mention all this because I would like to draw attention to the issue of keyboard short-cuts in general. Yes, we have all grown accustomed to the particular keyboard short-cuts. They are muscle memory to those of us who use the program a lot (including me).
But they are inconsistent and difficult to learn for new users. It is bad GUI design. For example, using Mac terminology (for the sake of convenience, namely mine) it seems that the convention of this could be better:
1) reserving keys WITHOUT modifiers for navigation and time controls
2) moving LABELS to "control + a key" (p for planets, s for spacecraft, etc) that is always the first letter of the item to be toggled (no more "n" for spacecraft, etc)
3) doing the same thing for toggling orbits but say, using shift + the first letter of the item to be toggled
This is not a comprehensive analysis and might not be the best way to go... but right now there is no robust system at all. Starting with the use of modifiers - which should be as consistent as possible. I could work something out more comprehensive than this... but I wanted to throw it out there to see if the community is receptive to changing the keyboard layout before I put the effort in.
I know we're all used to it the way it is... but I have no doubt, with a better system in place, we will all get quickly used to that as well. Even more so.
Thanks, Steve
Last edited by BlindedByTheLight on 14.08.2005, 01:00, edited 1 time in total.
Steven Binder, Mac OS X 10.4.10
-
- Developer
- Posts: 3776
- Joined: 04.02.2005
- With us: 19 years 9 months
-
- Posts: 408
- Joined: 27.03.2002
- With us: 22 years 8 months
- Location: Leiden, The Netherlands
Oh yes! I agree completely (and too tired right now to explain why)
Lapinism matters!
http://settuno.com/
http://settuno.com/
at the moment i'm too tired for a full quoted answer so yes in user -and dev-view the keyboard shortcuts need to be reassigned and perhaps somehow "code-united"
at the moment we have several locations and functions where keyboard-input is processed and therefore a bit hard to locate in the code
i used SHIFT+X because they were mostly "unused"... first tried that with CTRL+ but that didn't work so well.
currently celestia converts all input to UPPER case and then applies the compare-functions, thats why most normal key-bindings are DUPs.
so what did was simply take all current shortcuts for labeling and "split" them up into lower and upper-case.
"c" is already given to center location, so no-go here for comet-labels/orbits
"w" and "W" were already assigned to cometlabels and asteroid-labels so i had to move either one of them.
"Z" was unused and i just realized that i double-assigned "z" with decelerate... shame on me! (but it still works)
the "a" assignmend is somehow broken (couldn't find out why) so that CRTL+a seems to be the normal "a" for accelerate but also for toggling planet-haze ... BUT the correct key-assignment for haze is CTRL+SHIFT+a which works just fine...
maybe because (a and z) are controlled by a completly different function which i couldn't locate yet.
ok bedtime now...
PS: who the heck came up with octal comparison of special-key-bindings? :p
at the moment we have several locations and functions where keyboard-input is processed and therefore a bit hard to locate in the code
i used SHIFT+X because they were mostly "unused"... first tried that with CTRL+ but that didn't work so well.
currently celestia converts all input to UPPER case and then applies the compare-functions, thats why most normal key-bindings are DUPs.
so what did was simply take all current shortcuts for labeling and "split" them up into lower and upper-case.
"c" is already given to center location, so no-go here for comet-labels/orbits
"w" and "W" were already assigned to cometlabels and asteroid-labels so i had to move either one of them.
"Z" was unused and i just realized that i double-assigned "z" with decelerate... shame on me! (but it still works)
the "a" assignmend is somehow broken (couldn't find out why) so that CRTL+a seems to be the normal "a" for accelerate but also for toggling planet-haze ... BUT the correct key-assignment for haze is CTRL+SHIFT+a which works just fine...
maybe because (a and z) are controlled by a completly different function which i couldn't locate yet.
ok bedtime now...
PS: who the heck came up with octal comparison of special-key-bindings? :p
most recent celestia win32-SVN-build - use at your own risk (copy over existing 1.5.1 release)
-
Topic authorBlindedByTheLight
- Posts: 485
- Joined: 19.03.2005
- With us: 19 years 8 months
- Location: Los Angeles, CA
Thanks Phoenix... and I see now this is more than an organizational issue... and very much a "now where did I put that code to control that keyboard short-cut issue". I had not realized the mechanics of things before. Thanks for the clarification, however. Guess we'll add it to the feature list...?
Steven Binder, Mac OS X 10.4.10
ElChristou wrote:I agree with Steven... What about a poll to see if people are agree for a new keyboard definition?
I agree too, as I agree with Steve on a more logical (first letter) short-cut sequence.
And moreover I would like to know if there is a possibility to add these commands to the .cel scripting features.
I'm not a programmer, but I think it could be a bit more difficult than adding keybord commands, or not?
Thank you.
Andrea
"Something is always better than nothing!"
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
HP Omen 15-DC1040nl- Intel® Core i7 9750H, 2.6/4.5 GHz- 1TB PCIe NVMe M.2 SSD+ 1TB SATA 6 SSD- 32GB SDRAM DDR4 2666 MHz- Nvidia GeForce GTX 1660 Ti 6 GB-WIN 11 PRO
- t00fri
- Developer
- Posts: 8772
- Joined: 29.03.2002
- Age: 22
- With us: 22 years 7 months
- Location: Hamburg, Germany
phoenix wrote:at the moment i'm too tired for a full quoted answer so yes in user -and dev-view the keyboard shortcuts need to be reassigned and perhaps somehow "code-united"
at the moment we have several locations and functions where keyboard-input is processed and therefore a bit hard to locate in the code
Effectively /all/ key shortcuts are processed in celestia/celestiacore.cpp
if I remember correctly. At least that's the idea.
Some time ago we had extensive discussions among the developers about a completely new two-key assignment, with the first key labelling the "action group" and the second one, memnonically, the specific action in that group.
Nothing came out of it so far...
i used SHIFT+X because they were mostly "unused"... first tried that with CTRL+ but that didn't work so well.
currently celestia converts all input to UPPER case and then applies the compare-functions, thats why most normal key-bindings are DUPs.
so what did was simply take all current shortcuts for labeling and "split" them up into lower and upper-case.
The uppercase conversion is only done for /letter/ codes!
NOT for ;:'",<.>/?9(0)[{]}...
the "a" assignmend is somehow broken (couldn't find out why) so that CRTL+a seems to be the normal "a" for accelerate but also for toggling planet-haze ... BUT the correct key-assignment for haze is CTRL+SHIFT+a which works just fine...
maybe because (a and z) are controlled by a completly different function which i couldn't locate yet.
Hmm,..do you have a problem with your CTRL key? Things work just fine for me under Linux and (most probably in) Windows. CTRL+a =atmosphere ON|OFF while a|A is 'accelerate'
PS: who the heck came up with octal comparison of special-key-bindings? :p
To use octal keycodes instead of the key strings has been a popular way since > 20 years in professional coding...
Bye Fridger
Last edited by t00fri on 15.08.2005, 09:06, edited 1 time in total.