forked from fanruan/design
Browse Source
* commit 'ac5976346ac2ce30299cf629d062c78ed029e458': PMD PMD PMD PMD REPORT-2773 mac中复制快捷键的修复 PMD PMD REPORT-2773 mac中复制快捷键的修复 REPORT-2773 mac中复制快捷键的修复master
superman
8 years ago
11 changed files with 1687 additions and 1320 deletions
File diff suppressed because one or more lines are too long
@ -0,0 +1,21 @@
|
||||
package com.fr.common.inputevent; |
||||
|
||||
import com.fr.stable.OperatingSystem; |
||||
|
||||
import java.awt.event.KeyEvent; |
||||
import java.awt.event.MouseEvent; |
||||
|
||||
/** |
||||
* Created by hzzz on 2017/5/26. |
||||
*/ |
||||
public class InputEventBaseOnOS { |
||||
private static final boolean IS_MACOS = OperatingSystem.isMacOS(); |
||||
|
||||
public static boolean isControlDown(MouseEvent e) { |
||||
return IS_MACOS ? e.isMetaDown() : e.isControlDown(); |
||||
} |
||||
|
||||
public static boolean isControlDown(KeyEvent e) { |
||||
return IS_MACOS ? e.isMetaDown() : e.isControlDown(); |
||||
} |
||||
} |
Loading…
Reference in new issue