Skip to content

kagi.com: Pressing A opens AI assistant #159

Description

@Stevoisiak

Website URL:

https://kagi.com/search?q=Paramount+plus+free+trial

Description:

Pressing "A" key while on search results page opens AI assistant.

Screenshot(s):

Image Image

System Info:

  • Operating System: Windows 11
  • Internet Browser: Microsoft Edge
  • Adblocker: uBlock Origin

Additional info

The changing page seems to be handled by the following code

case "a":
    if (window.modalOpen)
        return;
    if ("/" == window.location.pathname) {
        quickAnswerBox = document.querySelector("#adv_search_btn"),
        quick_answer_trigger_btn = document.querySelector("._0_land_adv_search_btn");
        quickAnswerBox && !quickAnswerBox.checked && quick_answer_trigger_btn.click(),
        "w" == event.key ? document.querySelector('._0_land_cat_box button[data-cat_select="empty"]').click() : "i" == event.key ? document.querySelector('._0_land_cat_box button[data-cat_select="sel_images"]').click() : "v" == event.key ? document.querySelector('._0_land_cat_box button[data-cat_select="sel_videos"]').click() : "n" == event.key ? document.querySelector('._0_land_cat_box button[data-cat_select="sel_news"]').click() : "m" == event.key ? getKagiSetting("privacy_pass") || document.querySelector('._0_land_cat_box button[data-cat_select="sel_map"]').click() : "a" != event.key || getKagiSetting("privacy_pass") || (window.location.href = "/assistant")
    } else {
        if ("a" == event.key && !document.querySelector("#shortcutAHelp"))
            return;
        currentHighlightedChild = getQueryParameter("q");
        if (!currentHighlightedChild)
            return;
        let path = "/search";
        if ("i" == event.key ? path = "/images" : "v" == event.key ? path = "/videos" : "n" == event.key ? path = "/news" : "m" == event.key ? path = "/maps" : "a" == event.key && (path = "/assistant"),
        !new URLSearchParams(window.location.search).get("l") && window.location.pathname == path)
            return;
        window.location.href = path + "?q=" + currentHighlightedChild
    }
    break;

Metadata

Metadata

Assignees

No one assigned

    Labels

    block requestRequest to block a specific itemkeyboard navigationIssue with keyboard shortcuts or selecting menu options via keyboard.requires accountRequires making an accountrequires subscriptionTesting requires an account not every user can access (Paid subscription, work account, etc.)

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions