feat: support jk key bindings (to move through events) (#240)

This commit is contained in:
Warren 2024-01-16 17:59:46 -08:00 committed by GitHub
parent 499c537ea5
commit 6321d1f055
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 10 additions and 3 deletions

View file

@ -0,0 +1,6 @@
---
'@hyperdx/app': patch
'@hyperdx/api': patch
---
feat: support jk key bindings (to move through events)

View file

@ -448,7 +448,8 @@ export const LogSidePanelKbdShortcuts = () => {
<div className="d-flex align-items-center gap-3">
<div>
Use <Kbd></Kbd>
<Kbd></Kbd> arrow keys to move through events
<Kbd></Kbd> arrow keys or <Kbd>k</Kbd>
<Kbd>j</Kbd> to move through events
</div>
<div className={styles.kbdDivider} />
<div>

View file

@ -561,10 +561,10 @@ export const RawLogTable = memo(
[highlightedLineId, onRowExpandClick, dedupLogs],
);
useHotkeys(['ArrowRight'], () => {
useHotkeys(['ArrowRight', 'j'], () => {
shiftHighlightedLineId(1);
});
useHotkeys(['ArrowLeft'], () => {
useHotkeys(['ArrowLeft', 'k'], () => {
shiftHighlightedLineId(-1);
});