Java tutorial
//package com.java2s; import java.awt.event.InputEvent; public class Main { /** Return true if the Shift button was held when 'e' was generated. */ public static boolean shiftPressed(InputEvent e) { return (e.getModifiersEx() & InputEvent.SHIFT_DOWN_MASK) != 0; } }