Fix for keyboard support.

Do we want all the arrays collapsed ? Essentially that will collapse the whole json into one single line. If thats  the requirement , the pull request should do the job. This is to resolve #6.
Please note that only left and right arrow key work for toggling the collapse operation.