Hotkeys
- 25 Jun 2020
- 1 Minute zum Lesen
- Drucken
- DunkelLicht
- pdf
Hotkeys
- Aktualisiert am 25 Jun 2020
- 1 Minute zum Lesen
- Drucken
- DunkelLicht
- pdf
The content is currently unavailable in German. You are viewing the default English version.
Artikel-Zusammenfassung
Fanden Sie diese Zusammenfassung hilfreich?
Vielen Dank für Ihr Feedback
This will enable the hotkey of shift + space
to open the model and shift + escape
to end the session by default. To disable hotkeys set the property "useHotkeys" to false.
<script type="text/javascript" >
window.Cobrowse = window.Cobrowse || {};
window.Cobrowse.modal = window.Cobrowse.modal || {
commandQueue:[],
useHotkeys: true
};
</script>
These hotkeys can be customized, the following example enables startSession to be triggered by
shift + enter
. Given a key press event all of the following conditions should match the specified properties.window.Cobrowse = window.Cobrowse || {};
window.Cobrowse.modal = window.Cobrowse.modal || {
commandQueue:[],
useHotkeys: true,
hotkeys: {
startSession: {
shiftKey: true,
keyCode: 13
},
endSession: {
shiftKey: true,
keyCode: 27,
}
}
};
This is the specification of the hotkey format (using TypeScript interface and type declarations):
interface Window {
Cobrowse: {
modal: {
useHotkeys: boolean,
hotkeys: {
startSession: HotkeyConfig | HotkeyConfig[];
endSession: HotkeyConfig | HotkeyConfig[];
}
}
}
}
type HotkeyConfig = {
readonly altKey: boolean;
readonly code: string;
readonly ctrlKey: boolean;
readonly isComposing: boolean;
readonly key: string;
readonly keyCode: number;
readonly location: number;
readonly metaKey: boolean;
readonly repeat: boolean;
readonly shiftKey: boolean;
};
War dieser Artikel hilfreich?