简体   繁体   English

在Linux(Ubuntu)中禁用快捷键

[英]Disable shortcut keys in Linux (Ubuntu)

I need some tips in how can I disable shortcut keys in Linux (Ubuntu), while running an application. 我需要一些提示,说明如何在运行应用程序时如何在Linux(Ubuntu)中禁用快捷键。 I need simple application, which when is started all the shortcut keys are disabled, including ctrl+c,ctrl+v,alt+tab, etc. I need Java implementation. 我需要一个简单的应用程序,该应用程序在启动时将禁用所有快捷键,包括ctrl + c,ctrl + v,alt + tab等。我需要Java实现。 After exiting the application, everything should be normal again. 退出应用程序后,一切都应恢复正常。 Any help will be useful, also and some simple code :) 任何帮助都将是有用的,还有一些简单的代码:)

Regards 问候

Java is a cross-platform environment, so it avoids any system-specific libraries . Java是跨平台环境,因此避免使用任何特定于系统的库 However, you can use JNI to call program in C or anything else, that will actually set hooks. 但是,您可以使用JNI在C或其他程序中调用程序,这实际上会设置钩子。

But note, that it really sucks, if the user cannot use Alt-Tab. 但是请注意,如果用户无法使用Alt-Tab,它确实很糟糕。

UPD. UPD。 There's a question on SO, that describes hot to better grab keystrokes in X. SO上有一个问题 ,它描述了更好地掌握X中的击键的热点。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM