keyboard

Xkb: How to convert a keycode to keysym

做~自己de王妃 提交于 2019-12-30 06:23:12
问题 I am simply trying to take a KeyCode and a modifier mask and convert it to a KeySym using the Xkb extension. I cant seem to figure out why this doesn't work. Its obvious that the modifiers dont match but I dont know why. I don't even know if I am converting the group correctly. #include <stdio.h> #include <stdlib.h> #include <X11/X.h> #include <X11/XKBlib.h> void check(XkbDescPtr keyboard_map, KeyCode keycode, unsigned int mask) { //What the hell is diff between XkbKeyGroupInfo and

how to implement shortcut key combination of CTRL or SHIFT + <letter> through javascript?

末鹿安然 提交于 2019-12-30 04:32:07
问题 ASP.NET 2.0 web application, how to implement shortcut key combination of CTRL + Letter , preferably through JavaScript, to make web application ergonomically better? How to capture multiple-key keyboard events through JavaScript? 回答1: The short answer is that you use Javascript to capture a keydown event and use that event to fire off a function. Relevant articles: http://www.openjs.com/scripts/events/keyboard_shortcuts/ http://udayms.wordpress.com/2006/03/17/ajax-key-disabling-using

Can I dismiss the iPhone keyboard by touching the background of DialogViewController (MonoTouch.Dialog)? [duplicate]

ε祈祈猫儿з 提交于 2019-12-30 04:32:07
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: MonoTouch.Dialog: Dismissing keyboard by touching anywhere in DialogViewController I'm using DialogViewController from MonoTouch.Dialogs. I'd like to be able to dismiss the keyboard by clicking on the background of the dialog. I usually employ the technique of filling the view with a large custom button and placing it behind all the other elements. However, I can't make this work in the DialogViewController. I

Android Show Soft Keyboard When First Activity Starts?

拈花ヽ惹草 提交于 2019-12-30 01:24:10
问题 I need to display the virtual keyboard when the application starts, but so far I've failed. I use this code in method "OnCreate"to display the virtual keyboard InputMethodManager imm = (InputMethodManager)getSystemService(Context.INPUT_METHOD_SERVICE); imm.toggleSoftInput(txtBuscar.getId(), InputMethodManager.SHOW_FORCED); this code works fine on any screen at any time, but does not work when the "first" activity begins. Why? I tried it when I start another activity and it works, but does not

Incorporating the Windows 7 onscreen keyboard into a WPF app

心已入冬 提交于 2019-12-30 00:40:09
问题 Windows 7 has a really nice onscreen keyboard program/control for touchscreens. I have a touchscreen app that was originally written for, and will be deployed on, XP. Is it possible to incorporate this keyboard directly into my app, rather than me using a custom control? I can find no programmatic information about it, so any links would be very helpful. Specifically, I'd need: To be able to use the keyboard on an XP machine that will have .NET 3.5 sp1 installed on it. To be able to hide the

Java object movement

做~自己de王妃 提交于 2019-12-29 09:35:31
问题 I am trying to get a circle to move through the input of a keyboard. I am not able to move the object at all. Can someone help me figure out what is wrong? Here is my code: import java.awt.Color; import java.awt.Graphics; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.JPanel; public class AlienInvader extends JPanel implements KeyListener{ Constants constant = new Constants(); public void update() { constant.x += constant.xvel; addKeyListener(this); }

Android - How to disable certain keys in virtual keyboard

流过昼夜 提交于 2019-12-29 09:15:09
问题 How to disable certain keys (say number/symbol keys) in Android virtual keyboard? Specifically I want user can't input a double quote ( " ) character when virtual keyboard is showed up when user focus on a standard android EditText widget. 回答1: How to disable certain keys (say number/symbol keys) in Android virtual keyboard? You can't, sorry. After all, the input method editor may not have "keys" in the first place. Specifically I want user can't input a double quote ( " ) character when

Trying to read keyboard input without blocking (Windows, C++)

南楼画角 提交于 2019-12-29 08:45:15
问题 I'm trying to write a Windows console application (in C++ compiled using g++) that will execute a series of instructions in a loop until finished OR until ctrl-z (or some other keystroke) is pressed. The code I'm currently using to catch it isn't working (otherwise I wouldn't be asking, right?): if(kbhit() && getc(stdin) == 26) //The code to execute when ctrl-z is pressed If I press a key, it is echoed and the application waits until I press Enter to continue on at all. With the value 26, it

SKStoreReviewController buttons hidden under keyboard

爱⌒轻易说出口 提交于 2019-12-29 08:42:52
问题 My swift iOS app has an active textfield with keyboard showing. Everytime user taps the return key on keyboard, I call SKStoreReviewController.requestReview() This may sound excessive but once the user has given the review, above statement will not do anything so I think my approach is correct. Problem is that on smaller screen devices (iPhone 5 etc), the displayed SKStoreReviewController's buttons are hidden under the keyboard. So the user gets stuck as they cannot dismiss the

Java: Input strings with keyboard class

混江龙づ霸主 提交于 2019-12-29 08:25:25
问题 I'm trying to input information in Java console application but I can't seem to run it. This is how my Java file looks like: public class Ovning1_3 { public static void main(String args[]) { String name; System.out.println("Enter your name"); name = Keyboard.readString(); System.out.println(name); } } But I get the error: Exception in thread "main" java.lang.Error: Unresolved compilation problem: Keyboard cannot be resolved at Ovning1_3.main(Ovning1_3.java:9) I have a keyboard.class file in