문제

Is it possible to tell if scroll lock mode is currently on through javascript without capturing scroll lock key press event (key was pressed outside of the browser)?

도움이 되었습니까?

해결책

No. As you can see in the Event interface properties, there's no scroll lock key state.

다른 팁

Quick and easy: no

(99,9% sure)

I guess you could dialog with your system through a COM component that would check the memory at adress 0x41? which is where the numlock/scroll lock status are.

Can't do it through JavaScript only though...

You can't get the status, but you can catch event when user press scrolllock button and use it as you like. Make your own status, show it to user and change it on keydown event.

$(window).keydown(function (evt) {
    console.log(evt.which);
});

This is possible now Key : 145 for scroll

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top