detect keyboard layout with javascript

后端 未结 5 715
盖世英雄少女心
盖世英雄少女心 2020-11-29 08:47

Is there any way to detect the current keyboard layout using JavaScript? I found this, but it only detects if the visitor is on the english layout. I need to know the exact

5条回答
  •  萌比男神i
    2020-11-29 09:01

    You are looking for is how to detect their Locale. In the HTTP headers this is stored in the Accept-Language header, but thats not available to the browser through pure JS.

    There's a jQuery plugin called 'Browser Language' that might get you going on the right path.

提交回复
热议问题