Roll20 uses cookies to improve your experience on our site. Cookies enable you to enjoy certain features, social sharing functionality, and tailor message and display ads to your interests on our site and others. They also help us understand how our site is being used. By continuing to use our site, you consent to our use of cookies. Update your cookie preferences .
×
Create a free account

Is it possible to capture SHIFT + CLICK on a character sheet button?

Curious if it's possible to capture whether a player clicks on a button or shift + clicks and if it's possible to change what clicking on it does if you can. For example... ... on the OGL character sheet, it would be awesome if shift + clicking could prepend /w GM to the front of the string being sent to chat.
1484824154
Finderski
Pro
Sheet Author
Compendium Curator
That would be awesome. 
Could also be used for systems that have a advantage/disadvantage system. Something like shift click is advantage and ctrl click is disadvantage.
1484865449
Lithl
Pro
Sheet Author
API Scripter
Well, there's a suggestions forum... =)
1484869578
Finderski
Pro
Sheet Author
Compendium Curator
Brian said: Well, there's a suggestions forum... =) That's worked out well for "Custom Status Icons"...  ;-)
Brian said: Well, there's a suggestions forum... =) Wasn't a suggestion... more of a can it be done post. I dunno if that's something that's currently possible via html/css.
1484877250
Silvyre
Forum Champion
SkyCaptainXIII said: I dunno if that's something that's currently possible via html/css. Not sure either, but there might be a way to somewhat emulate this functionality via CSS. e.g. Hovering over a "roll button" for 2 seconds causes that button to move underneath a "GM roll button" positioned below it.
1484891504
Lithl
Pro
Sheet Author
API Scripter
SkyCaptainXIII said: Brian said: Well, there's a suggestions forum... =) Wasn't a suggestion... more of a can it be done post. I dunno if that's something that's currently possible via html/css. Yes, at least for the devs to add to the system. Part of the data sent to JavaScript when you click something is what modifier keys were held down at the time. Specifically, the callback for an onClick event gets a  MouseEvent object as a parameter. Additionally, any (textual) data can potentially be stored in a data-* attribute in the HTML, so potentially a sheet author could include something like data-modifier_alt="/w GM ..." and the devs could pick that up if the alt key was held. Silvyre said: SkyCaptainXIII said: I dunno if that's something that's currently possible via html/css. Not sure either, but there might be a way to somewhat emulate this functionality via CSS. e.g. Hovering over a "roll button" for 2 seconds causes that button to move underneath a "GM roll button" positioned below it. CSS can't do "hover for two seconds". You're either hovering or you're not. That said, you might be able to animate a transition between two buttons (for example, have the GM button next to the regular button, both in a container the size of a single button with overflow: hidden, and then move the buttons an appropriate amount on hover), and one of the properties of an animation is a delay before the animation sequence begins.
1484894319

Edited 1484894381
Silvyre
Forum Champion
^ yup, something like that :D
I'd prefer to just be able to capture if something shift clicks or ctrl clicks on a link in a roll20 character sheet than start messing around with hover animations and this or that. I would like to make it easier for a user to be able to just click, rather than hover over and wait for extra buttons to appear or to clog up the skill list with more buttons. The idea is to make it so if a player wants to make a hidden skill check to the DM, they can just shift click the skill name, ability score name, or saving throw name (like how the OGL sheet works with clicking for rolls). This way they could adjust the output on the fly rather than adjusting the roll options and then making the check. If it's not possible, a hidden div with those options will probably be the cleaner method to use in order to save space.
That sheet looks really cool
Ed S. said: That sheet looks really cool Thanks. It's unfinished though. I need to re-do the macros so that they are compendium compatible for drag and drop... and create the macro itself that gets sent to chat. Everything else is pretty much done. At least for the PC version. I haven't even given thought towards adding an npc side.