reduced max heap size to 512m
added os dependent default hardware buffer size (1024 for windows, 256 for other platforms)
experimenting with keyboard example