Java tutorial
//package com.java2s; //License from project: Apache License import java.awt.event.InputEvent; public class Main { static boolean isShiftDown(final InputEvent event) { final int modifiersEx = event.getModifiersEx(); final int flag = modifiersEx & InputEvent.SHIFT_DOWN_MASK; return flag != 0; } }