Advertisement
FlipelyFlip

Disable ALT+ENTER

Dec 19th, 2024 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Ruby 0.83 KB | None | 0 0
  1. #==============================================================================
  2. # Chainsawkitten's Disable F1, Alt+Enter, F12 v1.1
  3. #------------------------------------------------------------------------------
  4. # Disable the use of F1, Alt+Enter and F12 by registering a hook which consumes
  5. # keypress events as well as setting the keyboard state.
  6. #==============================================================================
  7.  
  8. module CskDisable
  9.   # Whether to disable F1. 0 = enable, 1 = disable.
  10.   DISABLE_F1 = 0
  11.  
  12.   # Whether to disable F12. 0 = enable, 1 = disable.
  13.   DISABLE_F12 = 0
  14.  
  15.   # Whether to disable Alt+Enter. 0 = enable, 1 = disable.
  16.   DISABLE_ALT_ENTER = 1
  17. end
  18.  
  19. Win32API.new("System/F1AltEnterF12", "hook", "III", "").call(
  20.   CskDisable::DISABLE_F1,
  21.   CskDisable::DISABLE_F12,
  22.   CskDisable::DISABLE_ALT_ENTER)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement