Skip to content

Commit

Permalink
GH-47: minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
sskorol committed Dec 23, 2022
1 parent e03d824 commit f32e13f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 2 additions & 2 deletions frontend/src/components/keyboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import './style.css'
import { display, layout, buttonTheme, buttonAttributes, useStyles, syntethicKeysMap } from './keyboardSettings'

const Keyboard = observer(() => {
const {rosStore: { publishKey }} = useStore()
const {rosStore: { handleKeyboardShortcuts }} = useStore()
const [layoutName, setLayoutName] = useState('default')
const { classes } = useStyles();

Expand All @@ -17,7 +17,7 @@ const Keyboard = observer(() => {
setLayoutName(layoutName === 'default' ? 'shift' : 'default')
}
const key = syntethicKeysMap[button] || button
publishKey(key)
handleKeyboardShortcuts(key)
}

const theme = useTheme()
Expand Down
4 changes: 1 addition & 3 deletions frontend/src/store/RosController/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,9 +150,7 @@ class RosController {
if ([' ', 'spacebar'].includes(keyName)) {
this.rootStore.videoPlayerStore.onClick()
} else {
if (this.isTeleopReady) {
this.publishKey(keyName)
}
this.publishKey(keyName)
}
}
}
Expand Down

0 comments on commit f32e13f

Please sign in to comment.