浏览代码

Support `Command` / metaKey for keyboard shortcut (#266)

Cameron Taylor 1 月之前
父节点
当前提交
fd78898bb8
共有 1 个文件被更改,包括 3 次插入1 次删除
  1. 3 1
      hide/ui/Keys.hx

+ 3 - 1
hide/ui/Keys.hx

@@ -53,6 +53,8 @@ class Keys {
 			parts.push("Alt");
 		if( e.ctrlKey )
 			parts.push("Ctrl");
+		if( e.metaKey )
+			parts.push("Command");
 		if( e.shiftKey )
 			parts.push("Shift");
 		if( e.keyCode == hxd.Key.ALT || e.keyCode == hxd.Key.SHIFT || e.keyCode == hxd.Key.CTRL ) {
@@ -150,4 +152,4 @@ class Keys {
 		return ret;
 	}
 
-}
+}