diff --git a/client/components/Nav.jsx b/client/components/Nav.jsx
index a183b179..ee0bd9ab 100644
--- a/client/components/Nav.jsx
+++ b/client/components/Nav.jsx
@@ -3,6 +3,10 @@ import { Link } from 'react-router';
import InlineSVG from 'react-inlinesvg';
import classNames from 'classnames';
+import {
+ metaKeyName,
+} from '../utils/metaKey';
+
const triangleUrl = require('../images/down-filled-triangle.svg');
const logoUrl = require('../images/p5js-logo-small.svg');
@@ -127,6 +131,7 @@ class Nav extends React.PureComponent {
onBlur={this.handleBlur}
>
Save
+ {metaKeyName} + s
}
{ this.props.project.id && this.props.user.authenticated &&
@@ -201,6 +206,7 @@ class Nav extends React.PureComponent {
onBlur={this.handleBlur}
>
Tidy Code
+ {'\u21E7'} + Tab
@@ -210,6 +216,7 @@ class Nav extends React.PureComponent {
onBlur={this.handleBlur}
>
Find
+ {metaKeyName} + F
diff --git a/client/modules/IDE/components/KeyboardShortcutModal.jsx b/client/modules/IDE/components/KeyboardShortcutModal.jsx
index 0eb399ca..171a419b 100644
--- a/client/modules/IDE/components/KeyboardShortcutModal.jsx
+++ b/client/modules/IDE/components/KeyboardShortcutModal.jsx
@@ -8,7 +8,7 @@ function KeyboardShortcutModal() {
return (
-
- Shift + Tab
+ {'\u21E7'} + Tab
Tidy
-
@@ -31,7 +31,7 @@ function KeyboardShortcutModal() {
-
- {metaKeyName} + Shift + G
+ {metaKeyName} + {'\u21E7'} + G
Find Previous Text Match
@@ -61,19 +61,19 @@ function KeyboardShortcutModal() {
-
- {metaKeyName} + Shift + Enter
+ {metaKeyName} + {'\u21E7'} + Enter
Stop Sketch
-
- {metaKeyName} + Shift + 1
+ {metaKeyName} + {'\u21E7'} + 1
Toggle Text-based Canvas
-
- {metaKeyName} + Shift + 2
+ {metaKeyName} + {'\u21E7'} + 2
Turn Off Text-based Canvas
diff --git a/client/styles/abstracts/_variables.scss b/client/styles/abstracts/_variables.scss
index 612a5108..e3aa9e14 100644
--- a/client/styles/abstracts/_variables.scss
+++ b/client/styles/abstracts/_variables.scss
@@ -46,7 +46,8 @@ $themes: (
input-border-color: #b5b5b5,
about-list-text-color: #4a4a4a,
search-background-color: #ebebeb,
- dropdown-color: #414141
+ dropdown-color: #414141,
+ keyboard-shortcut-color: #757575
),
dark: (
logo-color: $p5js-pink,
@@ -83,7 +84,8 @@ $themes: (
input-border-color: #b5b5b5,
about-list-text-color: #f4f4f4,
search-background-color: #ebebeb,
- dropdown-color: #414141
+ dropdown-color: #414141,
+ keyboard-shortcut-color: #B5B5B5
),
contrast: (
logo-color: $yellow,
@@ -119,7 +121,8 @@ $themes: (
input-border-color: #b5b5b5,
about-list-text-color: #f4f4f4,
search-background-color: $white,
- dropdown-color: #e1e1e1
+ dropdown-color: #e1e1e1,
+ keyboard-shortcut-color: #e1e1e1
)
);
diff --git a/client/styles/components/_nav.scss b/client/styles/components/_nav.scss
index b4cc38ed..35bfffce 100644
--- a/client/styles/components/_nav.scss
+++ b/client/styles/components/_nav.scss
@@ -149,6 +149,14 @@
}
}
}
+
+ & button, & a {
+ width: 100%;
+ height: 100%;
+ display: flex;
+ justify-content: space-between;
+ align-items: center;
+ }
}
.nav__dropdown-item:last-child {
@@ -179,3 +187,16 @@
}
}
+.nav__keyboard-shortcut {
+ font-size: #{12 / $base-font-size}rem;
+ font-family: Inconsololata, monospace;
+ @include themify() {
+ color: getThemifyVariable('keyboard-shortcut-color');
+ }
+ .nav__dropdown-item:hover & {
+ @include themify() {
+ color: getThemifyVariable('button-hover-color');
+ }
+ }
+}
+
diff --git a/client/utils/metaKey.js b/client/utils/metaKey.js
index e88052e1..47899976 100644
--- a/client/utils/metaKey.js
+++ b/client/utils/metaKey.js
@@ -8,7 +8,7 @@ const metaKey = (() => {
return 'Ctrl';
})();
-const metaKeyName = metaKey === 'Cmd' ? 'Command' : 'Control';
+const metaKeyName = metaKey === 'Cmd' ? '\u2318' : 'Ctrl';
export {
metaKey,