ALT+C not working MS Edge browser

Raghavan Veettil 0 Reputation points
2025-08-15T19:29:16.42+00:00

ALT+C is not working edge browser. Please see below code

<html>

<head>

<meta charset="utf-8" />

<title></title>

<script src="https://code.jquery.com/jquery-3.7.1.js"

        integrity="sha256-eKhayi8LEQwp4NKxN+CfCh+3qOVUtJn3QNZ0TciWLP4="

        crossorigin="anonymous"></script>

<script>

    $(document).off('click', '#cmdClearQ').on('click', '#cmdClearQ', function (event) {

        fnClick();

    });

    $(document).off('click', '#cmdClearC').on('click', '#cmdClearC', function (event) {

        fnClick();

    });

    function fnClick() {

        window.alert("clear");

    }

</script>

</head>

<body>

<p>test</p>

<button type="button" class="icon_clear" id="cmdClearQ" name="cmdClearQ" accesskey="Q">ALT + Q</button>

<button type="button" class="icon_clear" id="cmdClearC" name="cmdClearC" accesskey="C">ALT + C</button>

</body>

</html>

Microsoft Edge | Microsoft Edge development
{count} votes

2 answers

Sort by: Most helpful
  1. Jay Pham (WICLOUD CORPORATION) 410 Reputation points Microsoft External Staff
    2025-08-18T03:31:14.08+00:00

    Dear Raghavan Veettil,

    Welcome! I am a Support Engineer specializing in Microsoft Edge, and I’m happy to assist you today.

    The issue you’re experiencing relates to keyboard shortcuts (accesskeys), such as Alt+C, not always working as expected in Microsoft Edge. This typically occurs because different browsers and operating systems handle accesskey shortcuts in various ways. Sometimes, the shortcut only focuses the button instead of activating it, or it may conflict with built-in browser or system shortcuts.

    Here’s how you can troubleshoot and resolve this:

    • Please ensure you are using the correct keyboard shortcut for your browser and operating system. For Microsoft Edge on Windows, it is typically Alt + [key]. (Refer to the table and links below for other combinations.)
    • If the shortcut still does not activate the button, we recommend adding a JavaScript event handler to your website to listen for the desired key combination (e.g., Alt+C) and trigger the button action automatically. This ensures the shortcut works reliably across browsers. Example solution:
          document.addEventListener('keydown', function(e) {
            if (e.altKey && e.code === 'KeyC') {
              e.preventDefault();
              document.getElementById('your-button-id').click();
            }
          });
      
      (Result: After updating your page with this script, pressing Alt+C should reliably trigger the button action in Microsoft Edge and other browsers.)

    For more information, please refer to the following documentation:
    👉 MDN Web Docs – Accesskey
    👉 WAI-ARIA Authoring Practices – Keyboard Shortcuts

    I hope this helps you resolve the issue quickly! If you agree with our suggestion, please try the steps above and let us know if you need any further assistance.


  2. Jay Pham (WICLOUD CORPORATION) 410 Reputation points Microsoft External Staff
    2025-08-21T07:58:03.66+00:00

    Hi @Raghavan Veettil,

    Thank you for clarifying that the accesskey="C" functionality stopped working recently, despite being operational a few weeks ago, and that you're unsure which update caused this issue in Microsoft Edge. I'm glad the keydown event listener solution restored the ALT+C and ALT+Q functionality, and I’ll address your concern about why accesskey="C" stopped working, providing a concise explanation and steps to investigate further.

    Steps to Investigate the Cause To identify the specific update or change:

    1. Check Edge Version:
    2. Test in InPrivate Mode:
      • Open an InPrivate window (Ctrl+Shift+N) and test your original code (without the keydown listener) to rule out extension interference.
    3. Check for Shortcut Conflicts:
      • Press ALT in Edge and then C. If a browser menu or feature activates, it indicates a native shortcut conflict.
      • Test in Chrome or Firefox to see if accesskey="C" still works there.
    4. Review Windows Updates:
      • Go to Settings > Windows Update > Update history and look for updates installed around the time the issue started (early August 2025).
    • Keep the keydown Solution: Continue using the keydown event listener for ALT+C and ALT+Q, as it’s reliable and unaffected by browser updates.
    • Alternative Accesskey: If you prefer using accesskey, consider switching to a less common key (e.g., accesskey="X") and update the keydown logic to avoid conflicts.
    • Monitor Updates: Watch Edge and Windows release notes for future changes to keyboard handling.
    • Accessibility: Add aria-label (e.g., aria-label="Clear Queue") to buttons for better screen reader support.

    If you want to pinpoint the exact update or explore further:

    • Share your Edge version (edge://settings/help) and OS (e.g., Windows 10/11).
    • Confirm if ALT+C works in other browsers or triggers any Edge-specific action (e.g., menu focus).
    • Let me know if extensions are active or if you need a modified script.

    I’m happy to assist further or research specific Edge updates. Thank you for confirming the fix worked!

    Best regards,
    Jay


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.