Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

How to completely disable Keyboard Shortcuts toggle in Yokohama (Next Experience UI)?

kack l
Tera Expert

 

Hello everyone,

We are running ServiceNow Yokohama and want to disable keyboard shortcuts globally.

We set the user preference to turn them off globally:

 

 
Name: glide.ui.keyboard.shortcuts.enabled System: true Value: false
 

However, users can still open Settings > Preferences and turn “Enable keyboard shortcuts” back on. When they do, a user-level preference (System = false) is created and overrides the global setting.

We also noticed a side effect:
When glide.ui.keyboard.shortcuts.enabled = false is applied, the “Print-friendly version” option disappears from the user menu, but when opening a Table List view, the print-friendly option reappears.

Goals

  1. Fully lock keyboard shortcuts off (ideally hide the toggle in Settings).

  2. Keep the “Print-friendly” option hidden consistently (including in list views).

Tried

  • Global glide.ui.keyboard.shortcuts.enabled = false (System = true) → works only as a default; users can override.

  • Removing user-level preferences → users can recreate.

  • UI Script to hide the toggle → works partially but not stable across reloads/navigation.

Questions

  • In Yokohama (Next Experience UI), is there an official/supported method to:

    • Prevent users from re-enabling keyboard shortcuts (hard lock), and/or

    • Permanently hide the “Enable keyboard shortcuts” toggle from Settings?

  • Also, what is the supported way to keep Print-friendly hidden in all contexts (especially list views)?

Any guidance or best practices from Yokohama environments would be greatly appreciated.
Thank you!

2 REPLIES 2

Deepak Shaerma
Kilo Sage
Kilo Sage

Hi @kack l ,

 

The most effective, server-side solution is not to hide the toggle (which is difficult and unstable in the Next Experience UI), but to prevent the user's override from ever being saved. ​We can do this with a before insert/update Business Rule on the sys_user_preference table.

Filter Conditions:

​Name is glide.ui.keyboard.shortcuts.enabled

​AND System is false

 

(function executeRule(current, previous /*, gs, fPrm*/) {

 

    // This rule prevents a user-level preference for keyboard shortcuts

    // from being created or updated, enforcing the global setting.

 

    // Optional: Add a message to inform the user why their change didn't save.

    gs.addInfoMessage("Keyboard shortcuts are disabled globally and cannot be re-enabled.");

 

    // Stop the record from being saved to the database.

    current.setAbortAction(true);

 

})(current, previous);

 

Your feedback is valuable ! If this solution was helpful, Please remember to click **Helpful** and mark the response as **Accept Solution**. It helps the community and recognize pur efforts as well.

 

Best Regards,

Deepak Sharma

Servicenow Rising Star 2025

 

hank you for your helpful response.

I confirmed that the Business Rule approach successfully prevents any user-level record of glide.ui.keyboard.shortcuts.enabled from being created or updated.

However, even though the preference record is not generated, the Keyboard shortcuts toggle still appears and can be switched ON on the user’s Settings (Preferences) page in the Next Experience UI.

The change is not actually saved (it reverts to OFF after refreshing), but the UI still allows users to interact with the toggle.

Is there any recommended way to also hide or disable that toggle from the Settings screen?