Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

[Feature] Detect OS and provide the keyboard shortcut's description accordingly

Open itaditya opened this issue 9 years ago • 10 comments

Currently the list of keyboard shortcuts present in the right mini sidebar displays each shortcut in the following format .

Command (or Alt) + Left Arrow

Instead of this we can detect the OS during the app load and then only show the corresponding command description. One major problem with the current app is that is prioritizing the Mac users over Windows users in these small ways. Why should the Windows user have to read more than the Mac user to discover a new shortcut. I hope that I'm making sense here :smile:

The solution I'm presenting will result in the following

Windows User - Alt + Left Arrow

Mac User - Command + Left Arrow

itaditya avatar Oct 16 '17 07:10 itaditya

@MartinSchoeler is there any place where you are already retrieving the OS name, if so I could reuse that code instead of writing my own.

itaditya avatar Oct 17 '17 09:10 itaditya

@itaditya https://github.com/RocketChat/Rocket.Chat/blob/develop/packages/rocketchat-ui-sidenav/client/toolbar.js#L101

MartinSchoeler avatar Oct 25 '17 13:10 MartinSchoeler

I am on it.

ozata avatar Feb 28 '20 06:02 ozata

I'm new to Rocket.chat and would like to work on this if someone isn't already. The link @MartinSchoeler provided seems to have been deleted. Can someone help me with where I can find information about the user's OS? Thanks.

RinkiyaKeDad avatar Sep 08 '20 14:09 RinkiyaKeDad

I'd like to work on this issue.

aradhya-gupta avatar Oct 17 '20 13:10 aradhya-gupta

Is this issue still open? I would like to work on this

nikkuAg avatar Jan 22 '22 14:01 nikkuAg

@itaditya is this open I would like to work on it

ankit-jha1210 avatar Feb 11 '22 15:02 ankit-jha1210

@MartinSchoeler Is this issue still open? I would like to work on this

Akshanshkaushal avatar Jun 10 '24 12:06 Akshanshkaushal

Hi team , I’d love to work on this feature if it’s available.

Detecting the user’s OS and displaying the appropriate keyboard shortcut descriptions sounds like a valuable UX improvement. I can implement this cleanly while keeping the behavior consistent across platforms.

Please let me know if I can proceed with this issue. Thanks!

ankitadhara28 avatar Jan 05 '26 13:01 ankitadhara28

Hi! I'd like to work on this issue.

My approach:

  1. Detect the user's OS using navigator.platform
  2. Conditionally render "Command" for Mac and "Alt" for Windows/Linux
  3. Update all keyboard shortcut displays in the sidebar

Could someone point me to the component that renders the keyboard shortcuts list?

Thanks!

KaushalC0des avatar Jan 09 '26 13:01 KaushalC0des