Skip to content

Commit

Permalink
GH-47: set physicalKeyboardHighlightPreventDefault prop in Keyboard c…
Browse files Browse the repository at this point in the history
…omponent depending on current tab
  • Loading branch information
alex-waverley committed Jan 20, 2023
1 parent 009c1a7 commit 315a8d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions frontend/src/components/keyboard/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,10 @@ import './style.css'
import { display, layout, buttonTheme, buttonAttributes, useStyles, syntethicKeysMap } from './keyboardSettings'

const Keyboard = observer(() => {
const {rosStore: { handleKeyboardShortcuts }} = useStore()
const {
rosStore: { handleKeyboardShortcuts },
navigationStore: { activeTab },
} = useStore()
const [layoutName, setLayoutName] = useState('default')
const { classes } = useStyles();
const keyboardRef = useRef(null);
Expand Down Expand Up @@ -44,7 +47,7 @@ const Keyboard = observer(() => {
baseClass={'simple-keyboard-main'}
physicalKeyboardHighlight={true}
physicalKeyboardHighlightPress={true}
physicalKeyboardHighlightPreventDefault={true}
physicalKeyboardHighlightPreventDefault={activeTab === 0}
physicalKeyboardHighlightTextColor={theme.palette.common.white}
physicalKeyboardHighlightBgColor={theme.palette.background.keyboardButtonBgPressed}
syncInstanceInputs={true}
Expand Down

0 comments on commit 315a8d8

Please sign in to comment.