User Tools

Site Tools


disabling_20_27sticky_20key_27_20action_20of_20shift

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

disabling_20_27sticky_20key_27_20action_20of_20shift [2018/03/31 13:19]
127.0.0.1 external edit
disabling_20_27sticky_20key_27_20action_20of_20shift [2018/04/16 10:50] (current)
richardrussell Added syntax highlighting
Line 1: Line 1:
 =====Disabling '​sticky key' action of Shift===== =====Disabling '​sticky key' action of Shift=====
  
-//by Richard Russell, October 2008//\\ \\  By default, pressing the **Shift** key five times activates the Windows **StickyKeys** accessibility feature. Whilst this can be useful for people with certain disabilities,​ it can be irritating if you use BBC BASIC'​s [[http://​www.bbcbasic.co.uk/​bbcwin/​manual/​bbcwin8.html#​vdu14|VDU 14]] //paged mode//, in which scrolling is paused until the Shift key is pressed.\\ \\  Although you can disable StickyKeys in Windows Control Panel, it may not be convenient to do so, and it isn't very user-friendly. A better approach may be to disable the specific action of the Shift key using the code below:\\ \\ +//by Richard Russell, October 2008//\\ \\  By default, pressing the **Shift** key five times activates the Windows **StickyKeys** accessibility feature. Whilst this can be useful for people with certain disabilities,​ it can be irritating if you use BBC BASIC'​s [[http://​www.bbcbasic.co.uk/​bbcwin/​manual/​bbcwin8.html#​vdu14|VDU 14]] //paged mode//, in which scrolling is paused until the Shift key is pressed.\\ \\  Although you can disable StickyKeys in Windows Control Panel, it may not be convenient to do so, and it isn't very user-friendly. A better approach may be to disable the specific action of the Shift key using the code below: 
 + 
 +<code bb4w>
         SPI_GETSTICKYKEYS = 58         SPI_GETSTICKYKEYS = 58
         SPI_SETSTICKYKEYS = 59         SPI_SETSTICKYKEYS = 59
Line 12: Line 14:
         sk.dwFlags% AND= NOT SKF_HOTKEYACTIVE         sk.dwFlags% AND= NOT SKF_HOTKEYACTIVE
         SYS "​SystemParametersInfo",​ SPI_SETSTICKYKEYS,​ DIM(sk{}), sk{}, 0         SYS "​SystemParametersInfo",​ SPI_SETSTICKYKEYS,​ DIM(sk{}), sk{}, 0
-This will disable the Sticky Key action of the Shift key for the remainder of the session. You can make the change permanent by altering the final parameter from 0 to **1**, but you probably won't want to do that.\\ \\  If you prefer, you can restore the previous setting before your program exits as follows:\\ \\ +</​code>​ 
 + 
 +This will disable the Sticky Key action of the Shift key for the remainder of the session. You can make the change permanent by altering the final parameter from 0 to **1**, but you probably won't want to do that.\\ \\  If you prefer, you can restore the previous setting before your program exits as follows: 
 + 
 +<code bb4w>
         SPI_GETSTICKYKEYS = 58         SPI_GETSTICKYKEYS = 58
         SPI_SETSTICKYKEYS = 59         SPI_SETSTICKYKEYS = 59
Line 30: Line 36:
         sk.dwFlags% = OldStickyFlags%         sk.dwFlags% = OldStickyFlags%
         SYS "​SystemParametersInfo",​ SPI_SETSTICKYKEYS,​ DIM(sk{}), sk{}, 0         SYS "​SystemParametersInfo",​ SPI_SETSTICKYKEYS,​ DIM(sk{}), sk{}, 0
 +</​code>​
disabling_20_27sticky_20key_27_20action_20of_20shift.txt · Last modified: 2018/04/16 10:50 by richardrussell