ID:91996
 
Resolved
The Shift, Ctrl, and Alt keys can now be used independently as macros. +Up macros for these keys will work as well, but key-repeat macros will not.
Applies to:DM Language
Status: Resolved (490)

This issue has been resolved.
Copied from BYOND Features forum by Airjoe

On request, I'd very much like to see the ability to define macros strictly for the Shift, Ctrl, and Alt keys, without any other buttons tied to them.

My reasoning is a mouse_pointer_icon one. In my game shift, alt, and ctrl alter the effect of a Click(). I'd really like to have the icon of the pointer change to a respective one when one of those three buttons are held down. If there is a possible work-around I'd gladly take it however.
Seconded
I have to agree, I remember requesting this a long time ago, but can't remember where the post is hidden..
This doesn't need discussion, everyone is in agreement here.
Welcome to the features tracker, SuperAntx; please enjoy yo- NEEDS DISCUSSION.
Airjoe, I think we need to discuss your last comment.
I don't think we can discuss it until we discuss the details of said discussion.
Bump for discussion.
We want/need macros solely for ctrl, shift, and alt - END.
lol there's no possible discussion that could go on here. Unless they want us to discuss how this could actually be implemented, in which case they need to release their source.

What needs to be discussed is that "Needs Discussion" tag they keep using.
This one, I actually have to agree with. Discussion my actually be needed. If Shift, etc. are going to be macros in and of themselves, then there would be room for them to interfere with Shift, etc. being modifiers as well. If that is not the case, "no discussion needed; gives us feature!"
I don't see how that would be a problem from their side. That would just be something for the developers to consider when creating their macros.
It shouldn't have any effect on the way macros currently work, except that you can also add ones for the modifiers alone.
If you had defined macros for both shift and shift+A, pressing shift+A would trigger the shift macro too.

I'm not sure how macros work exactly but I can imagine how this could cause problems. For example, if holding the shift key in your game makes players run, to move up while running you don't use the NORTH macro, it would be the SHIFT+NORTH macro because shift is treated as a modifier. In this case, you're trying to treat shift as just another key (in other words, you wouldn't have this issue if R was the run key because R isn't a modifier).

I can also see how alt might cause problems because of its default behavior (setting focus to the dropdown menu).
I believe that the way it should work is that any key should be able to be used as a modifier for any other key, with the amount of modifiers limited to three and the order of the keys actually making a difference, last key of course not being a modifier.

W+Space != Space+W
Shift+W+Space == W+Shift+Space

Using this, you could create simple macro combinations. W+Space could actually be forward and jumping movement.

The only thing that you'd have to realize here is that certain keyboards, as dumb as it sounds, will send throw the 'too many keys' error when you press certain key combinations. For example, my brother-in-law's keyboard throws the error when W and Spacebar are pressed together...

As for the point about Alt, it's already a modifier so it's a moot worry.

EDIT: As for the conflict between macros and modifiers, that's something that the developer has to take into account and no reason not to allow us to have it at all.

EDIT 2: If a macro is defined for Shift and nothing is defined for A and you press Shift+A, Shift should stay in effect. As well, if there is something defined for A, the macro for A should come into effect and Shift should go bye bye, as already happens with other macros.

EDIT III: If this system is initiated, maybe macros should be given the map_format treatment with macro_format, CLASSIC or DYNAMIC.
Supported
OrangeWeapons wrote:
Supported

AYE.
Guys, you know you can vote now, right?
Not if you are out of votes.
awwwww yeaaaaah