Monday, June 6, 2011

A Keyboard, at last

After many struggles constructing ST entities and digging through pages of GNOME shell code, I am progressing with the keyboard. Just last week the keyboard was merely a shell, a pretty picture, but now I have the key and extended key presses mostly working as well as the sizing of the buttons.

Example of typing with keyboard
With the following piece of code we can take advantage of event signals in order to emit the key press:
button.connect('button-press-event', Lang.bind(this, function () {; }));
There were a ton of little details in this piece of code that challenged my understanding of signal passing, but when I realized that event signals become global events once they are created that made it much easier to concentrate on the procedures that needed to be done once the event was processed.

Example of using extended keys
Uses event.get_source() in order to figure out whether a click has been directed within the extended key box or outside of it. In order to do this, however, you must push the current modal into the global stage. This is a tricky procedure, since when the modal is on the stage the focus is removed from whatever is clicked at the moment. The reason this needs to be done is because there are "holes" on the stage that don't get processed as events.

For the next week I'm going to begin working on the focus and position of the keyboard, so that it matches the rest of GNOME's layout. 

Also, I want to thank Marina for a great little piece of advice for the graphics crashes that I've been having recently on my Fedora 15 system with GNOME shell:
If your system crashes use CTRL+ALT+F2, type "DISPLAY=:0 gnome-shell", and then CTRL+ALT+F1.

Hopefully this issue is resolved soon, but until then this great little trick will save you a lot of trouble.



  1. Most people would suggest Digeus or Windsty Tune Up Suite as they are the best know on the market. They find and fix most of errors in the system than any other. I run them every time when my computer starts crashing or working slow. They also help to prevent and fix Blue Screen of Death problem.