This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
setxkbmap_by_name() { | |
ID=`xinput -list --id-only "$1"` | |
shift 2 | |
`setxkbmap -device $ID "$@"` | |
} | |
setxkbmap_by_name "daskeyboard" -layout de | |
setxkbmap_by_name "Topre Corporation HHKB Professional" -layout us |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Based on http://stackoverflow.com/a/33585501/1783214 | |
* | |
* Handle resizing enclosed View and scrolling to input | |
* Usage: | |
* <KeyboardHandler ref='kh' offset={50}> | |
* <View> | |
* ... | |
* <TextInput ref='username' | |
* onFocus={()=>this.refs.kh.inputFocused(this,'username')}/> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
var React = require('react'); | |
var ReactNative = require('react-native'); | |
var {AppRegistry, Text, WebView, View, Dimensions} = ReactNative; | |
var WebViewResizing = React.createClass({ | |
getInitialState: function () { | |
return { | |
webViewHeight: 100 // default height, can be anything |