Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #===============================================================================
- # Chainsawkitten's Disable F1, Alt+Enter, F12 v1.1
- #-------------------------------------------------------------------------------
- # Modified by mjshi to support for alt enter fullscreening
- #
- # Requires Full Input Keyboard by Cidiomar R. Dias Junior:
- # http://himeworks.com/2013/07/full-input-keyboard/
- #
- # Requires Fullscreen++:
- # http://pastebin.com/raw.php?i=kc1hzBek
- #
- #------------------------------------------------------------------------------
- # ** Make sure the Full Input Keyboard script is placed before this one! **
- # It doesn't matter how much before, it just has to be above this.
- #==============================================================================
- Win32API.new("System/F1AltEnterF12", "hook", "III", "").call(
- 0, # Disable F1? 0 = no, 1 = yes
- 0, # Disable F12? 0 = no, 1 = yes
- #-----------------------------------------------------------------------------
- # IMPORTANT! The value below *needs* to be 1 or your game will freeze when
- # you try to fullscreen.
- 1 # Disable AltEnter? 0 = no, 1 = yes
- )
- module Input
- class << self
- unless self.method_defined?(:input_update)
- alias_method(:input_update, :update)
- end
- def update
- input_update
- #-------------------------------------------------------------------------
- # Launch Fullscreen++ if the alt key is held down and enter key is
- # triggered or vice versa
- Graphics.toggle_fullscreen if (Input.press?(:ALT) && Input.trigger?(:RETURN)) || (Input.trigger?(:ALT) && Input.press?(:RETURN))
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement