ID:1878237
 
BYOND Version:507
Operating System:N/A
Web Browser:N/A
Applies to:Dream Seeker
Status: Open

Issue hasn't been assigned a status value.
Code:
/*
These are simple defaults for your project.
*/


world
fps = 25 // 25 frames per second
icon_size = 32 // 32x32 icon size by default

view = 6 // show up to 6 tiles outward from center (13x13 view)


// Make objects move 8 pixels per tick when walking

mob
step_size = 8

obj
step_size = 8

/mob/verb/keys_down()
set name = "keys_down"
set category = "what"
world << "keys down called"
/mob/verb/keys_up()
set name = "keys_up"
set category = "what"
world << "keys up called"

Then in a .dmf file or client macros file make a macro for ctrl+shift: keys_down and ctrl+shift+up:keys_up
Problem description:
Lummox says it should be working but it does not for me unless I add a non-modifier key to the macro. Example http://ss13.pomf.se/uploads/2015-06-20_13-30-44.webm
Works for me in .dmf file, tried shift+A and shift+ctrl+A

Using stable version.
In response to Rotem12
Rotem12 wrote:
Works for me in .dmf file, tried shift+A and shift+ctrl+A

Using stable version.

You misunderstand, macro doesn't work if it only contains modifier keys, ctrl, shift, alt
It seems it doesn't work only if ctrl and shift are combined although I haven't tried alt.

I'm not sure whether it's a bug or not you'd have to ask Lummox but as a workaround you can do something like this:
mob
var/tmp
shift = 0
ctrl = 0
verb
shift_down()
shift = 1
checkModifiers()
shift_up()
shift = 0
ctrl_down()
ctrl = 1
checkModifiers()
ctrl_up()
ctrl = 0

proc
checkModifiers()
if(shift && ctrl)
world << "keys down"


Of course I'm just displaying method, modify as you see fit.
I think a bug is in play here for sure. I'm gonna move this to Bug Reports so I remember to look into it. Probably not gonna have a fix for 508.1290 but I'll keep this thread handy.

The specific issue appears to be that macros using modifiers of modifiers don't work.
Thanks
This appears to be non-trivial to fix so it won't make 508.1290 for sure, but I'm still going to be looking into it.

At the heart of the issue is that we want to be able to handle macros for Ctrl, Shift, and Alt individually, but at the same time handle combos. Right now the macro setup has no concept of triggering multiple macros with one keypress.
any possibility of this getting a fix
I've popped this onto my list to look at.