Capture all Ctrl-? under Android

I'm modifying ConnectBot to take advantage of hardware keyboards and I need to capture all Ctrl-? presses. I've disabled all of the alphabetic menu shortcuts (such as Ctrl-C for copy) but the key presses still don't seem to be being received by the onKey event.

I'm fairly new to Android development (literally started today to fix ConnectBot to handle hardware keyboards) and quick Google searching doesn't seem to turn up anything about capturing Ctrl-? key presses.

How do I tell Android to pass these straight through to the onKey handler?


It turns out that the keyCode was set to the correct character value (e.g. 'C'). However, the result of getUnicodeChar() was 0 because CTRL was being held.

All that was needed was to add handling to get the unicode character regardless of the meta-keys that are being held down with:

if (event.isCtrlPressed())
    event = new KeyEvent(KeyEvent.ACTION_DOWN, keyCode);

Then later on it was necessary to encode the "CTRL is being held down" information in the key data that was being sent, which was already functionality provided by the ConnectBot code.

Need Your Help

AngularJS ng-repeat handle empty list case

javascript angularjs angularjs-ng-repeat angularjs-ng-show

I thought this would be a very common thing, but I couldn't find how to handle it in AngularJS. Let's say I have a list of events and want to output them with AngularJS, then that's pretty easy:

Data Modelling Advice for Blog Tagging system on Google App Engine

python google-app-engine bigtable data-modeling

Am wondering if anyone might provide some conceptual advice on an efficient way to build a data model to accomplish the simple system described below. Am somewhat new to thinking in a non-relational

Unable to pass datatable as table variable to a stored procedure

.net sql-server-2008 c#-4.0 stored-procedures datatable

I am passing values from a list to a datatable and then passing the datatable to a stored procedure as a table variable . For some reason ,the values are not getting passed correctly in the Table