Add "spacebar" as an editable command/shortcut

Hello, pressing “space-bar” run as an enter button. Is there a solution to assign “space-bar” to a personal command (I would like “ZoomSelected” for example).
Thanks

see chapter 3 “customizing the UI” in the lev 2 manual for help with this type of stuff, which you can get from help>learn rhino>tutorials and samples>lev 2 pdf

there is a whole section dedicated to this exact topic.

2 Likes

Can you be more precise please.
Rhino options > keyboard : haves only a limited editable Keys like F1 (not spacebar).
Rhino options > Alias : " " or “space” isn’t recognized in the alias column

So how can i do ?

did you read the manual chapter I sent earlier?

use an alias, and the space is simply a space, not the word space.

for instance this command string- _perspective cplane world top

broken down:

_perspective (this is the perspective command, the underscore forces the command in english)

the space between _perspective and cplane is interpreted as enter.
the space between cplane and world is interpreted as enter
the space between world and top is interpreted as enter.

Thanks @theoutside,

I think what he means is to be able to have the Spacebar as an option in the Keyboard list of shortcut keys. When you press Spacebar on the keyboard it would execute a Macro like the other shortcut keys can do.

spacebar_as_hotkey_01

And when you try to enter a space in an Alias Name field it does not consider a space as a valid Name which is understandable:

image

Currently, please correct me if I’m wrong, Spacebar is “hardcoded” to repeat the last command.

I believe the desire for @John122 and myself actually as well. Is to be able to use Spacebar for something else of our choosing. He wants to use ZoomSelected to have a super fast Spacebar bump to focus any selected object.

I would like to use it to run a specific python script for example. Either way, it appears to be unavailable as a shortcut key. I can hack it by listening for Keyboard events but then I would still be stuck with having overlap between the “repeat last command” current functionality of the Spacebar and whatever other macro/script I’m executing.

Is there any reason that it could not be added as a Keyboard shortcut? Admittedly I have not searched for this topic on the forums but I imagine this has come up in the past.

EDIT:

I did find this post:

Though it’s unclear why it cannot be changed and given that that was 6 years ago I kindly ask that we revisit this again.

Thanks for your help and consideration!

2 Likes

ah, yes space bar is hard coded, and cannot be changed.

Sorry I don’t mean to be annoying but can you elaborate on why it cannot be changed?

I would propose that, by default, in a fresh Rhino it could be set to “_RepeatLastCommand” or whatever that macro would be but giving the user the ability to change this is really important IMO.

Alternatively, if for some reason, you all have hardcoded the spacebar to a Nuclear Safety Device at McNeel and if we change it all of Rhino will implode… then sure we don’t need to change it but how about the modifier keys in conjunction with the Spacebar as as a viable alternative?

Ctrl+Spacebar, Shift+Spacebar, etc.

Thanks Kyle!

1 Like

that is way beyond my pay range and technical ability to explain why…the only thing I can say confidently is, it’s not going to change any time soon.

One of our devs like @stevebaer would likely be able to explain why.

Confirmed that it’s tied to a Nuke Button :crazy_face:

Thanks Kyle, curious to hear @stevebaer’s take!
Appreciate you all

1 Like

We could change this behavior, but it isn’t going to happen in Rhino 8. This could be considered for Rhino 9

3 Likes

I stand corrected.

1 Like

Understood, I would highly recommend adding it for R9. I realize I’m 1 person but I see more pros than cons (regarding adding support) from a user perspective.

Thanks for the consideration and response @stevebaer and @theoutside

2 Likes

Here’s the wishlist item
https://mcneel.myjetbrains.com/youtrack/issue/RH-83190/All-spacebar-to-do-something-else

No promises; I may dig into this and change my mind on the feasibility.

1 Like

I understand, but thank you very much for adding and looking into it