Disable Keyboard Shortcuts and Combination Keys with C# (3): Disable Ctrl + Alt + Del

Disable keyboard shortcuts-crx插件 语言:English 禁用任意键盘快捷键 可让您将包含Ctrl和Alt键(Ctrl + S,Ctrl + P,Ctrl + Shift + C等)的浏览器键盘快捷键设置为不执行任何操作。 只需前往chrome:// extensions / shortcuts并分配! 小巧,简单,不需要权限。 根据Apache许可证2.0版获得许可。 来源:https://github.com/google/disable-keyboard-shortcuts 立即下载
    In all combination keys on Windows platform Ctrl + Alt + Del is the most difficult to be disabled. The normal keyboard hook method is invalid. Developing a keyboard driver and replacing the Windows keyboard driver with it may be the perfect solution. But it is extremely hard. Fortunately someone recommended the following webpage on website stackoverflow.com:
http://www.northcode.com/blog.php/2007/07/25/Securing-Windows-For-Use-As-A-Kiosk

    An ingenious method was introduced there. It circumvented the difficulty of developing the keyboard driver. The basic idea is to reset keyboard scan code mapping by modifying Windows registry. The scan code mapping item is stored in the registry at:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout\Scancode Map
    It's difficult and danger to require common users to modify Windows registry. To develop a specialized program is a better choice. A C# program is given here. Note that the program MUST be run with Administrator Privileges. In order to make it take effect, to restart the computer is necessary.
    When it is run, the interface is as follows:



    Ctrl key can be disabled or enabled by running the program. Other modifier keys, including WIN and ALT keys are not processed. It's easy to modify the program to disable those keys. When Ctrl key is disabled, all combination keys relating to it, such as Ctrl + Alt + Del and Ctrl + Shift + Esc are also disabled.

Step:
1. Create a C# Windows Forms application in Visual Studio. The project name is 'EnableOrDisableCtrlKey';
2. Switch from code view to designer view, drag a label into the Windows Form from the toolbox. The label text is 'Enable or Disable Ctrl Key?'.
3. Drag three buttons into the Windows Form from the toolbox, named them by EnableButton, DisableButton and ExitButton;
4. Modify the file 'Form1.cs', the source code is as listed below:

/**************************************************
* Author: HAN Wei
* Author's blog: http://blog.csdn.net/henter/
* Date: Dec. 6th, 2016
* Description: demonstrate how to disable Ctrl key. Combination keys relating to Ctrl, 
*              such as Ctrl + Alt + Del and Ctrl + Shift + Esc, will also be disabled.
**************************************************/

using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;
using Microsoft.Win32;

namespace EnableOrDisableCtrlKey
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        private void EnableButton_Click(object sender, EventArgs e)
        {
            RegistryKey rkLm = Registry.LocalMachine;
            RegistryKey rkLmSys = rkLm.OpenSubKey("SYSTEM");
            RegistryKey rkLmSysCcs = rkLmSys.OpenSubKey("CurrentControlSet");
            RegistryKey rkLmSysCcsCtrl = rkLmSysCcs.OpenSubKey("Control");
            RegistryKey rkLmSysCCsCtrlKl = rkLmSysCcsCtrl.OpenSubKey("Keyboard Layout", true);
            try
            {
                rkLmSysCCsCtrlKl.DeleteValue("Scancode Map", true);
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message + "\n" + "Ctrl key has been enabled!\nYou don't need to enable it again.");
                return;
            }
            MessageBox.Show("Ctrl key is enabled!\nRestart computer to take effect!");
            rkLmSysCCsCtrlKl.Close();
        }

        private void DisableButton_Click(object sender, EventArgs e)
        {
            const string keyName = "HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Keyboard Layout";
            try
            {
                Registry.SetValue(keyName, "Scancode Map", new byte[] { 0, 0, 0, 0, 0, 0, 0, 0, 0x3, 0, 0, 0, 
                    0, 0, 0x1d, 0, 0, 0, 0x1d, 0xe0, 0, 0, 0, 0 }, RegistryValueKind.Binary);
            }
            catch (Exception exp)
            {
                MessageBox.Show(exp.Message);
                return;
            }
            MessageBox.Show("Ctrl key is disabled!\nRestart computer to take effect!");
        }

        private void ExitButton_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

    }
}

5. Build the program, run it with Administrator Privileges. It is necessary to restart the computer if Ctrl key is enabled or disabled.

从零开始:用RFSOC XCZU47DR搭建软件无线电开发环境(2023最新版) 本文详细介绍了如何使用Xilinx RFSoC XCZU47DR搭建高性能软件无线电(SDR)开发环境,涵盖硬件选型、开发环境配置、射频子系统校准及实战应用开发。特别针对2023年最新技术需求,提供从基础配置到高级优化的完整指南,助力科研人员和工程师快速掌握RFSoC开发技术。 阅读详情

相关推荐

FPGA串口通信----uart(一)

通过PLL锁相环IP的使用,可以输入时钟进行分频,倍频,也可以产生多路时钟输出信号。外部提供晶振的原因:①Fpga电路大多数需要时序分析②晶振在Fpga内部占空间大,所以放置于外部PCB板上Uart异步传输速率不能很快的原因:考虑到工程实际问题,假如时钟周期大(传输速率慢的话),采取到数据电平变化的边沿时刻的概率会小很多,这样数据也很准确,通常uart适用于2M.

mvpkuku的博客 974

Disable Keyboard Shortcuts and Combination Keys with C# (1): Disable frequently used hotkeys

In this article how to disable frequently used hotkeys with C# programming is introduced. Such hotkeys include: Alt + Tab, Alt +Esc, Alt + F4, Win, Ctrl + Esc.

henter的专栏 1672

手把手教你搞定6脚三位一体数码管的驱动(附C语言源码与Visual Studio调试技巧)

本文详细解析了6脚三位一体数码管的驱动原理与实战技巧,包括引脚复用、动态扫描时序、Visual Studio模拟调试及单片机实现。通过C语言源码示例和调试技巧,帮助开发者快速掌握非标准数码管的驱动方法,提升硬件开发效率。

weixin_30613727的博客 598

monaco-editor 如何禁用键盘快捷键 Keyboard Shortcuts

monaco-editor 如何禁用键盘快捷键 Keyboard Shortcuts

valsedefleurs的博客 1210

导带、价带

价带是电子的“束缚态”能量区间,决定材料的化学性质;导带是电子的“自由态”能量区间,直接决定材料的导电能力;禁带宽度则是区分金属、半导体与绝缘体的核心参数。通过调控能带结构(如掺杂、应变工程),可设计出具有特定电学和光学特性的功能材料,推动电子信息、能源转换等领域的技术革新。

weixin_51552564的博客 5152

Open5GS实战指南:Ubuntu 22.04环境下的5G核心网快速部署

本文提供Open5GS在Ubuntu 22.04环境下部署5G核心网的实战指南,涵盖环境准备、MongoDB配置、核心组件安装、WebUI部署及网络调优等关键步骤。通过详细的安装教程和常见问题解决方案,帮助开发者快速搭建开源5G核心网测试环境。

weixin_29202213的博客 548

禁用/屏蔽 Chrome 默认快捷键

Chrome 有一些内置的快捷键,但是它并没有像其他软件一样提供管理快捷键的界面。在某些时候,当我们因为个人需求希望禁用 Chrome 某些快捷键时,又无从下手。1、打开 Chrome 应用商店,搜索插件名称 “Disable keyboard shortcuts”,并进行安装。好在有开发者开发了 Chrome 插件,可以禁用 Chrome 快捷键的插件,我们可以通过安装这个插件进行屏蔽设置。2、安装后在插件管理界面的 “键盘快捷键” 中找到我们安装的这个应用,然后对应设置需要屏蔽的快捷键即可。

小单的博客专栏 1万+

Unreal Engine开发:角色动画与状态机_动画混合:通过混合节点实现平滑动画过渡

动画混合是提升游戏动画质量的关键技术之一。Unreal Engine提供了多种混合节点,包括BlendSpace1D、Blend Two By Bool、Blend Two By Alpha和Sequencer,每种节点适用于不同的场景。通过合理使用这些节点,可以实现平滑、自然且高效的动画过渡效果。此外,遵循最佳实践和高级应用技巧,可以进一步优化动画质量和性能。希望本节内容对你在Unreal Engine中实现动画混合有所帮助,使你的游戏角色动作更加流畅和自然。

chenlz2007的博客 1248

how to disable github hotkeys/keyboard shortcuts

Tampermonkey, The chrome app, is able to achieve this. The script is as following. // ==UserScript== // @name Disable keyboard shortcuts at github // @description Stop websites from high...

yusisc的博客 655

杰理蓝牙SPP用户接口详细文档

本文档详细介绍了基于JL701n芯片的蓝牙SPP用户接口实现。主要内容包括:1) 文件结构分析,包含必要的头文件和调试配置;2) 核心数据结构,如全局变量和TWS功能ID定义;3) 五大功能模块实现:数据发送、状态管理、数据接收、TWS支持和初始化清理;4) API接口说明,包括公共接口函数和回调函数;5) 使用教程,涵盖基本流程和高级应用示例。该接口支持虚拟串口连接,实现蓝牙设备间数据传输,特别针对TWS场景进行了优化,提供连接状态管理、数据收发等功能。文档还包含错误处理、重试机制等实用建议,适合蓝牙SP

qq_42014563的博客 1188

10、在线已知位置的旅行商问题算法解析

本文深入探讨了在线已知位置的旅行商问题(OLTSP-L)在不同度量空间下的算法设计与性能分析。针对一般度量空间、环和星型结构,分别提出了Algorithm 1、Algorithm 2和Algorithm 3,详细阐述了其执行流程、竞争比及时间复杂度。文章还对比了各算法的性能,讨论了实际应用中的实时性、资源限制和环境不确定性,并展望了未来在更复杂结构、多服务器协同及不确定性处理等方面的研究方向,为相关领域的理论与实践提供了有力支持。

ios99的博客 51

Chrome浏览器禁用Ctrl + S

浏览器禁用Ctrl + S

weixin_45669817的博客 3292

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

电脑使用小技巧之快捷键屏蔽

该问题起源于我的使用习惯,我经常使用快捷键来唤醒微信窗口,形成习惯后,有时忘记登录微信也会按这个快捷键来切换窗口,导致在浏览网页时,直接将浏览器整个关闭掉了,很影响我的使用,在网上寻找了很多方法,最终总结出自己的这一套可行的操作方法,在此分享给有需要的朋友~

zihenggood的博客 7864

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

chorm谷歌关闭任意快捷键

chorm谷歌关闭任意快捷键

A乐神的博客 3825

TMS_WebGMaps_1.9.8.0_Full_Source

TMS_WebGMaps_1.9.8.0_Full_Source 全源码 delphi cbuilder

Chromium浏览器的一些使用总结

Chromium浏览器的一些使用总结

weixin_43950208的博客 2040

Disable Keyboard Shortcuts and Combination Keys with C# (2): Disable Win + L

In this article how to disable 'Win + L' combination keys with C# programming is introduced.

henter的专栏 942

FastGPT 接入企业微信智能机器人:4 步让企业内部问答跑起来

FastGPT 是一个基于大语言模型的知识库问答平台,提供数据处理、RAG 检索和可视化 AI 工作流编排等开箱即用的能力。把 FastGPT 接入企业微信后,员工无需再打开网页端,直接在企微里 @ 机器人提问,由你配置好的知识库和应用来作答。本文按"先看效果 → 弄清原理 → 分两侧配置 → 验收排错"的顺序,带你完成 FastGPT 与企微智能机器人的集成。 ## 最终效果:员工在企微里直接

gitblog_00591的博客 448

禁用键盘快捷键_如何在Windows中使用键盘快捷键临时禁用键盘

禁用键盘快捷键If you’ve got a pet or small child, you know that an unguarded keyboard can spell disaster—or more likely, spell “dhjkhskauhkwuahjsdkja,mnsd”. We’ve got a tool for locking and unlocking your ke...

cum44153的博客 7386

win10禁止触摸键盘_如何阻止Windows 10的触摸键盘在登录时出现

win10禁止触摸键盘Recently, my laptop has been presenting me with Windows’ Touch Keyboard every time I open the lock screen…even though my laptop doesn’t have a touch screen. Having a similar issue? Here are...

cum88284的博客 3495

禁用Ctrl+alt+del

XP中,Ctrl+Alt+Del可以打开任务管理器(偶发现Ctrl+Shift+Esc也可以),关于禁用这个热键,网上是见了多了,有这几种方法:   1、通过注册表禁用,网上大多数用此方法,打开任务管理器就会提示被禁用   2、监视窗口或进程,一发现就K了   3、键盘Hook(其实没效果- -)   4、Open Environ$("WinDir") & "\system32\

dmxyzk的博客 6213

C#中将以0x开头的16进制字符串转换成对应的整数

本文介绍了C#中如何将以0x开头的16进制字符串转换成对应的整数。

henter的专栏 8490

C#中使用X509Certificate2类获取数字证书颁发者和持有者的名称信息

本文介绍了使用C#获取X.509证书中颁发者或持有者Common Name的方法。

henter的专栏 8316

Hide Start Button and TaskBar in Win7 or WinXP by Using C#

This article introduces how to hide start button and taskBar in Win7 or WinXP by using C#.

henter的专栏 1452
上一篇: Disable Keyboard Shortcuts and Combination Keys with C# (2): Disable Win + L
下一篇: Build Mini-XML DLL with Visual Studio Command Prompt
henter
博客等级 码龄24年 283粉丝 132原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值