Skip to content

Commit

Permalink
feat: change to ctrlKey and open flyout
Browse files Browse the repository at this point in the history
Signed-off-by: Lin Wang <wonglam@amazon.com>
  • Loading branch information
wanglam committed Dec 27, 2023
1 parent 510b685 commit 945186e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion public/chat_header_button.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ describe('<HeaderChatButton />', () => {
key: '/',
code: 'NumpadDivide',
charCode: 111,
metaKey: true,
ctrlKey: true,
});
expect(screen.getByLabelText('chat input')).toHaveFocus();
});
Expand Down
6 changes: 3 additions & 3 deletions public/chat_header_button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ export const HeaderChatButton = (props: HeaderChatButtonProps) => {

useEffect(() => {
const onGlobalMouseUp = (e: KeyboardEvent) => {
if (e.metaKey && e.key === '/') {
if (e.ctrlKey && e.key === '/') {
inputRef.current?.focus();
}
};
Expand Down Expand Up @@ -170,11 +170,11 @@ export const HeaderChatButton = (props: HeaderChatButtonProps) => {
</EuiBadge>
) : (
<EuiBadge
title="press + / to start typing"
title="press Ctrl + / to start typing"
className="llm-chat-header-shortcut-cmd"
color="hollow"
>
+ /
Ctrl + /
</EuiBadge>
)}
</span>
Expand Down

0 comments on commit 945186e

Please sign in to comment.