File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3979,6 +3979,14 @@ struct MouseEvent {
39793979 float getX () const { return x; }
39803980 float getY () const { return y; }
39813981 int getAction () const { return action; }
3982+ int getModifiers () const {
3983+ int m=0 ;
3984+ if (shiftDown) m|=1 ;
3985+ if (controlDown) m|=2 ;
3986+ if (altDown) m|=4 ;
3987+ if (metaDown) m|=8 ;
3988+ return m;
3989+ }
39823990};
39833991
39843992struct KeyEvent {
@@ -3998,6 +4006,14 @@ struct KeyEvent {
39984006 bool isMetaDown () const { return metaDown; }
39994007 char16_t getKey () const { return key; }
40004008 int getKeyCode () const { return keyCode; }
4009+ int getModifiers () const {
4010+ int m=0 ;
4011+ if (shiftDown) m|=1 ;
4012+ if (controlDown) m|=2 ;
4013+ if (altDown) m|=4 ;
4014+ if (metaDown) m|=8 ;
4015+ return m;
4016+ }
40014017 int getAction () const { return action; }
40024018};
40034019
You can’t perform that action at this time.
0 commit comments