我喜欢Windows-L的键盘快捷方式,可以锁住电脑。有没有类似的 “关机 "和 "待机 "的快捷键?是否可以将Windows-L重映射为其他功能?
得分
33
Advertisement
答案 (12)
解决方案找到了!
得分
23
2009-11-19 20:37:37 +0000
使用AutoHotkey脚本,你可以重新映射Win+L快捷方式,然后为Sleep创建另一个快捷方式(我选择的是Win+S,一般情况下,除非你使用OneNote,否则不会使用):
#l:: ; Win+L
Shutdown, 0 ; this is the code for Log Off
return
#s:: ; Win+S
DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0) ; DLL call to sleep
return
在AutoHotkey的帮助文件中,有更多关于DLL调用的细节:
; Call the Windows API function "SetSuspendState" to have the system suspend or hibernate.
; Windows 95/NT4: Since this function does not exist, the following call would have no effect.
; Parameter #1: Pass 1 instead of 0 to hibernate rather than suspend.
; Parameter #2: Pass 1 instead of 0 to suspend immediately rather than asking each application for permission.
; Parameter #3: Pass 1 instead of 0 to disable all wake events.
DllCall("PowrProf\SetSuspendState", "int", 0, "int", 0, "int", 0)
Advertisement
Advertisement
得分
5
2009-11-20 22:47:33 +0000
有一个使用现有快捷键的键盘解决方案,不过不是作为一个和弦(即在按下一个键之前释放每个键):
- Win, →, Enter - 上次使用的关机操作
- Win, →, → - 选择关机操作
matt wilkie
http://superuser.stackexchange.com/users/6891
Advertisement
得分
1
2012-05-27 06:31:46 +0000
这应该真的能帮到你。Windows 7 键盘快捷键 / Windows / Keyboard-Shortcut.com
关机其实就是Win→Enter。
Advertisement
得分
1
2015-11-20 07:50:53 +0000
在运行
shutdown /l
内创建一个快捷方式,然后
set to shortcut key to WIN+ALT+L
完成
Mickey Perlstein
http://superuser.stackexchange.com/users/6891
Advertisement
得分
0
2017-08-15 19:32:22 +0000
注销快捷方式(Win 10/8/7/Vista)
按Ctrl+Alt+Delete,然后按Alt+L: Alt+K - 切换用户* : Alt+W - **注销* : Alt+L - **修改密码…* : Alt+C - **启动任务管理*r: Alt+T
Stevoisiak
http://superuser.stackexchange.com/users/6891
得分
-1
2012-02-20 15:56:43 +0000
在windows7系统下,从cmd提示符中查看 “关机 "命令。
不幸的是,虽然它有休眠选项,但不包括 "睡眠"。
Beverly Howard
http://superuser.stackexchange.com/users/6891
