Jump to content


Photo

Possibility of registers a keyboard command to start the tool

keyboard command start tool

  • Please log in to reply
2 replies to this topic

#1 Raul (ulneiz)

Raul (ulneiz)

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 935 posts
  • Gender:Male
  • Location:Spain

Posted 12 July 2017 - 16:22

I think I asked this question months ago and it was not very clear to me. A week ago I saw a tool, which I can not find now, which registered a keyboard command that worked in Renoise, not in the tool.

 

My question is: Is it possible to register with an XXX tool an ALT + F1 command (the "New assignement" in Preferences/Keys), to then invoke the XXX tool when it is closed?

 

I use:

renoise.tool():add_keybinding {
  name = "Global:Tools:VPD",
  invoke = function() dialog_main() end
}

This not exist? :

renoise.tool():add_keybinding {
  name = "Global:Tools:VPD",
  invoke = function() dialog_main() end
  assignement = "ALT + F1"  --<----------------------- THIS???
}

Any way to save this assignment through the tool? This way you prevent the user from having to enter Preferences / keys to register the command manually.

 

This seems so obvious to me that it surprises me if it is not possible...

 

What would be the same, a function that changes the empty value of assignement by a text ( "ALT + F1" ). Is there any way to do this?


Edited by Raul (ulneiz), 13 July 2017 - 11:33.

:excl: Development of my tool: GT16-Colors

 

:excl: My API wishlist R3.1 (updated 24 July 2017):

Spoiler

 

:excl: My Renoise 3.1 wishlist (updated 18 July 2017):

Spoiler

#2 joule

joule

    Guruh Motha Fakka is Levitating and Knows Everything About Renoise Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPipPip
  • 1444 posts
  • Gender:Not Telling
  • Location:Sweden
  • Interests:music, philosophy, engineering

Posted 12 July 2017 - 19:49

No. It's up to the user to select the keyboard assignment. Otherwise I guess we could have a bit too much fun overriding other shortcuts...



#3 Raul (ulneiz)

Raul (ulneiz)

    Guruh Member

  • Normal Members
  • PipPipPipPipPipPipPipPipPipPipPipPip
  • 935 posts
  • Gender:Male
  • Location:Spain

Posted 13 July 2017 - 00:19

No. It's up to the user to select the keyboard assignment. Otherwise I guess we could have a bit too much fun overriding other shortcuts...

 

I think it's a shame. The creator of the tool already knows which commands he could use, to avoid overlaps. Moreover, it would be easy to avoid. If Renoise already uses this command, the tool can not overwrite it, and that's it.

 
At least that way, the creator of the tool has more capacity over keyboard commands. This would be the scheme:
renoise.tool():add_keybinding {
  name = "the_namel:the_name2:the_name3",
  key = "the_command_keyboard, ie: CTRL + ALT + F1"    <---include!
  invoke = the_function()
}
key = "the_command_keyboard, i.e.: CTRL + ALT + F1" (if the command is already in use (or poorly written) do not overwrite!)
 
key, assignement, command... no matter the name, "key" is shorter :lol:.

:excl: Development of my tool: GT16-Colors

 

:excl: My API wishlist R3.1 (updated 24 July 2017):

Spoiler

 

:excl: My Renoise 3.1 wishlist (updated 18 July 2017):

Spoiler