WThirtyTwoSendSysCommand

WThirtyTwoSendSysCommand

One way that you can interact with Windows is to send it commands via ‘w32-send-sys-command’. These can be bound to a key with an anonymous function or a named function. Examples of both are given.

Anonymous Functions

 (global-set-key [(f4)] (function (lambda () "Maximize frame" (interactive) (w32-send-sys-command 61488))))

Named Functions

 (defun my-maximize-frame ()
  "Maximize frame"
  (interactive)
  (w32-send-sys-command 61488))
 
 (global-set-key [(f4)] 'my-maximize-frame)

w32-send-sys-command Codes