[SOLVED] Using shift + mouse roll

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
goldo
Regular
Posts: 124
Joined: Mon Jan 23, 2017 8:23 am
Contact:

[SOLVED] Using shift + mouse roll

#1 Post by goldo »

Hi,

I am trying to make a screen detect a mousewheel action to do something, but only when 'shift' is pressed simultaneously.

I was under the impression from reading the documentation here and here that one could use a combination of mouse and keyboard inputs, likeso:

Code: Select all

key ["shift_K_UP", "shift_mousedown_4"] action Return("up")
But instead, it throws a nasty error:

Code: Select all

I'm sorry, but an uncaught exception occurred.

While running game code:
  File "game/BKmain.rpy", line 1760, in script
    $ r = ui.interact()
  File "game/BKmain.rpy", line 1760, in <module>
    $ r = ui.interact()
Exception: Invalid key specifier mousedown_4
Is there a way to detect shift+mousewheel within a screen? Thank you guys for your help...
Last edited by goldo on Mon Dec 12, 2022 11:34 am, edited 1 time in total.

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Using shift + mouse roll

#2 Post by PyTom »

This isn't possible now, but I'm tracking it as an enhancement at https://github.com/renpy/renpy/issues/4122
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

goldo
Regular
Posts: 124
Joined: Mon Jan 23, 2017 8:23 am
Contact:

Re: Using shift + mouse roll

#3 Post by goldo »

Great, thank you!

User avatar
PyTom
Ren'Py Creator
Posts: 16088
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

Re: Using shift + mouse roll

#4 Post by PyTom »

Just added this, it should be in tomorrow's nightly.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

goldo
Regular
Posts: 124
Joined: Mon Jan 23, 2017 8:23 am
Contact:

Re: Using shift + mouse roll

#5 Post by goldo »

Fantastic, thank you!

User avatar
Andredron
Miko-Class Veteran
Posts: 700
Joined: Thu Dec 28, 2017 2:37 pm
Location: Russia
Contact:

Re: [SOLVED] Using shift + mouse roll

#6 Post by Andredron »

thank you very much for your and your colleagues hard work

Post Reply

Who is online

Users browsing this forum: Kocker