@@ -229,58 +229,12 @@ function updateKMSelectionRange(start, end) {
229229}
230230
231231var lastKeyTip = null ;
232- function oskCreateKeyPreview ( x , y , w , h , t ) {
233- if ( lastKeyTip &&
234- lastKeyTip . t == t &&
235- lastKeyTip . x == x &&
236- lastKeyTip . y == y &&
237- lastKeyTip . w == w &&
238- lastKeyTip . h == h ) {
239- return ;
240- }
241- lastKeyTip = { x :x , y :y , w :w , h :h , t :t } ;
242-
243- fragmentToggle = ( fragmentToggle + 1 ) % 100 ;
244- var div = document . createElement ( 'div' ) ;
245- div . innerHTML = t ;
246- var dt = div . firstChild . nodeValue ;
247- window . location . hash = 'showKeyPreview-' + fragmentToggle + '+x=' + x + '+y=' + y + '+w=' + w + '+h=' + h + '+t=' + toHex ( dt ) ;
248- }
249-
250- function oskClearKeyPreview ( ) {
251- lastKeyTip = null ;
252- fragmentToggle = ( fragmentToggle + 1 ) % 100 ;
253- window . location . hash = 'dismissKeyPreview-' + fragmentToggle ;
254- }
255232
256233function signalHelpBubbleDismissal ( ) {
257234 fragmentToggle = ( fragmentToggle + 1 ) % 100 ;
258235 window . location . hash = 'helpBubbleDismissed-' + fragmentToggle ;
259236}
260237
261- function oskCreatePopup ( obj , x , y ) {
262- if ( obj != null ) {
263- var i ;
264- var s = '' ;
265- var shift = false ;
266- var keyPos = x . toString ( ) + ',' + y . toString ( ) ;
267- for ( i = 0 ; i < obj . length ; i ++ )
268- {
269- // elementID contains the layer and coreID
270- s = s + obj [ i ] . elementID ;
271- if ( obj [ i ] . sp == 1 || obj [ i ] . sp == 2 ) shift = true ;
272- if ( typeof ( obj [ i ] . text ) != 'undefined' && obj [ i ] . text != null && obj [ i ] . text != '' ) s = s + ':' + toHex ( obj [ i ] . text ) ;
273- if ( i < ( obj . length - 1 ) ) s = s + ';'
274- }
275- fragmentToggle = ( fragmentToggle + 1 ) % 100 ;
276- var hash = 'showMore-' + fragmentToggle + '+keyPos=' + keyPos + '+keys=' + s ;
277- if ( shift ) {
278- hash = hash + '+font=' + 'SpecialOSK' ;
279- }
280- window . location . hash = hash ;
281- }
282- }
283-
284238function suggestionPopup ( obj , custom , x , y , w , h ) {
285239 if ( obj != null ) {
286240 var s = JSON . stringify ( obj ) ;
@@ -320,12 +274,6 @@ function showKeyboard() {
320274 keyman . refreshOskLayout ( ) ;
321275}
322276
323- function executePopupKey ( keyID , keyText ) {
324- // KMW only needs keyID to process the popup key. keyText merely logged to console
325- //window.console.log('executePopupKey('+keyID+'); keyText: ' + keyText);
326- keyman . executePopupKey ( keyID ) ;
327- }
328-
329277// Cannot make it explicitly async / await on API 21.
330278function executeHardwareKeystroke ( code , shift , lstates , eventModifiers ) {
331279 console_debug ( 'executeHardwareKeystroke(code=' + code + ',shift=' + shift + ',lstates=' + lstates + ',eventModifiers=' + eventModifiers + ')' ) ;
0 commit comments