keyboard

How to Generate Keyboard Input Using libevdev in C

梦想与她 提交于 2020-01-01 17:36:44
问题 I would like to write an application to generate keyboard input (i.e. to the system it would look just like a button on the keyboard had been pressed) for a Linux system. I would like to use C and xdotools are not an option. Libevdev looks promising, but so far I haven't been able to get it to work. First, can libevdev do what I want? Most of the documentation is focused on reading the incoming input and outputting it, but the API does feature a function to "Post an event through the uinput

Flex: Simulate key press

泪湿孤枕 提交于 2020-01-01 15:03:09
问题 I'm creating a virtual keyboard for a touchscreen Flex app and i'm trying to simulate a key press by dispatching a KeyboardEvent. I've written a handler function to listen for the event and act accordingly. So far so good... but it's starting to get complicated as i have to manage the focused textInputs (easy), the cursor position in those fields (not to so easy), etc. Now, if only there was a way to actually dispatch a KeyboardEvent that Flex would actually interpret as a genuine key press

Excluding some keys from XGrabKeyboard

时间秒杀一切 提交于 2020-01-01 10:52:38
问题 Consider an application where it's desirable to grab the keyboard when focused in order to capture all window manager commands (Alt+F4 and whatnot) for processing. Now, this has the downside that the user has no way of switching to another application or virtual desktop via the keyboard when the keyboard is grabbed. I'd like to have a user-defined whitelist of key combination (say, the key combinations for switching virtual desktops) that are excluded from the grab. I can think of two

How to scroll the UITableviewcell scroll up when the keyboard appears? [duplicate]

会有一股神秘感。 提交于 2020-01-01 10:06:10
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Table View scroll when text field begin editing iphone I have loaded many UITextFields in UITableview. Maximum i have 15 UITextFields in UITableView cells. I want to move(Scroll) up the the Cell when the Keyboard/UIActionSheet(UIPickerView) appears. Please suggest/guide me any sample code to solve this problem. Thanks in advance. 回答1: Please try below code in -textFieldShouldBeginEditing .... self.tblView.frame=

UITextView with “Done” button *and* “Return” key?

非 Y 不嫁゛ 提交于 2020-01-01 09:31:33
问题 I use a UITextView for multiline text entry in my iPhone app, and I have set the "Return" key to display "Done." I've also set up the return key to disable first responder status, so that hitting "done" actually exits the UITextView. However, I also want to enable users to be able to enter multiline text into the UITextView, i.e. to be able to use the "Return" key. Is there any way to make this work on the iPhone/iPad's UI? 回答1: It'll be time consuming but you could create your own keyboard

UITextView with “Done” button *and* “Return” key?

霸气de小男生 提交于 2020-01-01 09:31:30
问题 I use a UITextView for multiline text entry in my iPhone app, and I have set the "Return" key to display "Done." I've also set up the return key to disable first responder status, so that hitting "done" actually exits the UITextView. However, I also want to enable users to be able to enter multiline text into the UITextView, i.e. to be able to use the "Return" key. Is there any way to make this work on the iPhone/iPad's UI? 回答1: It'll be time consuming but you could create your own keyboard

Phonegap KeyboardShrinksView and position fixed on iOS not applying correctly

烂漫一生 提交于 2020-01-01 07:39:12
问题 I use the 2.9.0 version of Phonegap and I want that when the keyboard appears my WebView shrinks like it's done in Android phonegap apps. I have footer and header elements in fixed position, and when the keyboard is open it causes trouble (the footer and header loose their fixed position state). I think the KeyboardShrinksView settings could fix that, according to the phonegap documentation : http://docs.phonegap.com/en/2.9.0rc1/guide_project-settings_ios_index.md.html#Project%20Settings

How to create virtual keyboard in osx?

不羁岁月 提交于 2020-01-01 07:22:29
问题 I want to create a virtual keyboard in osx. Is it possible? I mean can I make a program that gives same signals than real keyboard. Example of this kind of keyboard would be onscreen keyboard, or keybord viewer (does it have necessary interface btw). How low should I start? Should I make a device driver e.g. virtual (wireless) keyboard? Or does cocoa etc. have the necessary stuff? The requirements I have are: - a list of tuples (time, key_down/key_up, key_code) corresponds to person typing -

Bind Keyboard to left/right navigation

孤人 提交于 2020-01-01 05:40:12
问题 I am a photographer and have a website where I am unable to edit the 'template' structure but can upload javascript/css etc. I want to bind next/prev navigation to keyboard right/left. The structure of the links are: <div class="image_navigation"> <h4>Image Navigation</h4> <ul> <li class="index"><a href="LINKURL">Index</a></li> <li class="previous"><a href="LINKURL">Previous</a></li> <li class="next"><a href="LINKURL">Next</a></li> </ul> </div> I referred to this and managed to create this. $

How to get iPhone OS 3.1 muffled keyboard sound?

时光总嘲笑我的痴心妄想 提交于 2020-01-01 05:03:29
问题 I have added the iPhone's Tock sound to my own custom keyboard like this: NSString *path = [[NSBundle bundleWithIdentifier:@"com.apple.UIKit"] pathForResource:@"Tock" ofType:@"aiff"]; SystemSoundID soundID; AudioServicesCreateSystemSoundID((CFURLRef)[NSURL fileURLWithPath:path], &soundID); AudioServicesPlaySystemSound(soundID); // we don't dispose of the sound to keep the sound in the cache for the next time //AudioServicesDisposeSystemSoundID(soundID); In iPhone OS 3.1, however, the keyboard