Thursday 17 September 2015

iOS API

iOS API for InputStick is finally available:

 
Project Setup:
Clone repository: `git clone git@github.com:wiecek/InputStickAPI.git`

Usage:
ISManager:
  • Create ISManager object with proper delegate
  • Connect with InputStick Device

ISKeyboardHandler:
  • Create ISKeyboardHandle object injecting the previously created ISManager
  • Send text to InputStick using: (void)sendText:(NSString *)text
Be sure to first take a look at very simple demo app.

Keep in mind that this is relatively early version: only keyboard interface is supported, available keyboard layouts: en-US and pl-PL (all other layouts that are available in Android version will be added soon).

Please share your opinions about the API and let me know about any bugs, in comments section. This will help with improving next releases.

Wednesday 9 September 2015

USB Remote v1.43

List of changes:
  • Typing speed can be adjusted (Settings -> General) (This should help when working with BIOS or old/slow hardware).
  • Position of custom keyboard can be adjusted (Settings -> Keyboard (Custom)).


  • Position of presentation controls can be adjusted (Settings -> Presentation).


  • Setting screen orientation is now persistent (saved as a preference). 
  • Uses updated InputStick API.
  • Fixed Swedish keyboard layout bug (application will no longer crash when Swedish keyboard layout is selected).

API update


Updated API.

InputStick Broadcasts - new, easy way to use InputStick in your app:

Starting with 1.40 version of InputStickUtility (update will be available on GooglePlay in a few hours) it is possible to send data using broadcasts. Typing text is now this easy:

        InputStickBroadcast.type(MainActivity.this, "some text to type");

(each call results in sending a broadcast to InputStickUtility, which puts appropriate action into FIFO queue, see com.inputstick.api.broadcast.InputStickBroadcast class for more details).

InputStickUtility takes care of everything:
  • enables Bluetooth,
  • asks user to select InputStick device (if more than one is available),
  • establishes Bluetooth connection,
  • select keyboard layout and typing speed (can be set in preferences),
  • closes connection (when application requests to do so or after reaching max inactivity period),
  • if anything goes wrong, handles all InputStick-related errors.
Using broadcasts introduces additional latency, compared to "standard API". If precise timing, direct control over connection and buffers are necessary in your use case, you should use "standard API".
Example:
  • password manager app: latency increased by several milliseconds most likely won't be even noticed.
  • remote control app: additional latency can make such app unusable in many situations.

For more details, please download latest API and take a look at "BroadcastDemo" example.

Adjustable typing speed:

Text typing speed can be decreased by multiplying number of HID reports. The more reports USB host will receive, the longer it will take to type.
Example (typing "a" character, 3 reports - 100% typing speed):
  • Report 1: keys released,
  • Report 2: "A" pressed,
  • Report 3: keys released.

Example (typing "a" character, 6 reports - 50% typing speed):
  • Report 1: keys released,
  • Report 2: keys released,
  • Report 3: "A" pressed,
  • Report 4: "A" pressed,
  • Report 5: keys released,
  • Report 6: keys released.

Decreasing typing speed can help to solve missing characters problems, which can occur when working with BIOS (due to simplified keyboard implementation) or advanced text editors (due to spell-checking, auto-complete and similar features).

Easier way to use keyboard layouts:

It is no longer necessary to get KeyboardLayout:

        KeyboardLayout layout = KeyboardLayout.getLayout("pl-PL");
        layout.type("some text in Polish");

now you can simply call:

        InputStickKeyboard.type("some text in Polish", "pl-PL");

Other changes:

  • fixed "init" package name (com.inputstick.init to com.inputstick.api.init),
  • fixed problem when connection gets stuck on "USB not ready" step,
  • BT4.0 connection timeout now works properly,
  • optimized look-up-tables for keyboard layouts,
  • fixed Swedish keyboard layout (could cause app crash),
  • case is now ignored when using layout codes ("en-US" = "en-us" = "EN-US").

Protocol documentation.

  • fixed mistakes in command examples.
  • added info about known bugs in 0.97 firmware version.