Skip to content

Commit 080c0c9

Browse files
committed
fixed docs for override keymap
1 parent a98a96e commit 080c0c9

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

docs/plugins/app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ SDK provides various methods that can be used within the application.
88

99
This method can be used to merge and override the existing keymap (coming from `settings.json`) by using a custom keymap in runtime. The method will merge all key mappings by overriding the existing key mappings with the new ones when a key is defined in both keymaps.
1010

11-
`keepDuplicates` flag is set to `false` by default, which means duplicated values (like two keys listening to `Back`) will be removed from the final keymap. If `keepDuplicates` is set to `true`, duplicated **values** will be kept in the final keymap.
11+
`keepDuplicates` flag is set to `false` by default, which means duplicated values (like two different keys trigger the `Back` action) will be removed from the final keymap. If `keepDuplicates` is set to `true`, duplicated **values** will be kept in the final keymap.
1212

1313
#### Usage
1414

src/Application/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ export default function(App, appData, platformSettings) {
131131
overRideKeyMap(customKeymap, keepDuplicates = false) {
132132
const baseKeymap = this.stage.application.config.keys
133133
Object.keys(customKeymap).reduce((keymapping, key) => {
134-
// prevent duplicate values to exist in final keymapping (i.e. 2 keys listening to 'Back')
134+
// prevent duplicate values to exist in final keymapping (i.e. 2 keys triggering 'Back')
135135
if (!keepDuplicates) {
136136
Object.keys(baseKeymap).forEach(baseKey => {
137137
if (baseKey != key && baseKeymap[baseKey] == customKeymap[key]) {

0 commit comments

Comments
 (0)