(MouseEvent e)
| 168 | |
| 169 | |
| 170 | @Override |
| 171 | public void mousePressed(MouseEvent e) { |
| 172 | // Using mousePressed() (or mouseReleased()) because mouseClicked() |
| 173 | // won't be fired if the user nudges the mouse while clicking. |
| 174 | // https://github.com/processing/processing/issues/3529 |
| 175 | setPressed(true); |
| 176 | |
| 177 | shift = e.isShiftDown(); |
| 178 | |
| 179 | // It looks like ActionEvent expects old-style modifiers, |
| 180 | // so the e.getModifiers() call is actually correct. |
| 181 | // There's an open JDK bug for this, but it remains unresolved: |
| 182 | // https://bugs.openjdk.java.net/browse/JDK-8186024 |
| 183 | |
| 184 | // Mostly this is only used for shift, but some modes also make use of |
| 185 | // alt as a way to control debug stepping and whatnot. [fry 210813] |
| 186 | // https://github.com/processing/processing4/issues/67 |
| 187 | |
| 188 | //noinspection deprecation |
| 189 | actionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED, |
| 190 | null, e.getModifiers())); |
| 191 | } |
| 192 | |
| 193 | |
| 194 | @Override |
nothing calls this directly
no test coverage detected