Skip to content

Commit

Permalink
chore(android): Remove popup code
Browse files Browse the repository at this point in the history
  • Loading branch information
darcywong00 committed Sep 19, 2023
1 parent f58cd50 commit 250b8a6
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 644 deletions.
52 changes: 0 additions & 52 deletions android/KMEA/app/src/main/assets/android-host.js
Original file line number Diff line number Diff line change
Expand Up @@ -229,58 +229,12 @@ function updateKMSelectionRange(start, end) {
}

var lastKeyTip = null;
function oskCreateKeyPreview(x,y,w,h,t) {
if(lastKeyTip &&
lastKeyTip.t == t &&
lastKeyTip.x == x &&
lastKeyTip.y == y &&
lastKeyTip.w == w &&
lastKeyTip.h == h) {
return;
}
lastKeyTip = {x:x,y:y,w:w,h:h,t:t};

fragmentToggle = (fragmentToggle + 1) % 100;
var div = document.createElement('div');
div.innerHTML = t;
var dt = div.firstChild.nodeValue;
window.location.hash = 'showKeyPreview-'+fragmentToggle+'+x='+x+'+y='+y+'+w='+w+'+h='+h+'+t='+toHex(dt);
}

function oskClearKeyPreview() {
lastKeyTip = null;
fragmentToggle = (fragmentToggle + 1) % 100;
window.location.hash = 'dismissKeyPreview-'+fragmentToggle;
}

function signalHelpBubbleDismissal() {
fragmentToggle = (fragmentToggle + 1) % 100;
window.location.hash = 'helpBubbleDismissed-'+fragmentToggle;
}

function oskCreatePopup(obj,x,y) {
if(obj != null) {
var i;
var s = '';
var shift = false;
var keyPos = x.toString() + ',' + y.toString();
for(i=0; i<obj.length; i++)
{
// elementID contains the layer and coreID
s=s+obj[i].elementID;
if(obj[i].sp == 1 || obj[i].sp == 2) shift = true;
if(typeof(obj[i].text) != 'undefined' && obj[i].text != null && obj[i].text != '') s=s+':'+toHex(obj[i].text);
if(i < (obj.length -1)) s=s+';'
}
fragmentToggle=(fragmentToggle+1) % 100;
var hash = 'showMore-' + fragmentToggle + '+keyPos=' + keyPos + '+keys=' + s;
if(shift) {
hash = hash + '+font=' + 'SpecialOSK';
}
window.location.hash = hash;
}
}

function suggestionPopup(obj,custom,x,y,w,h) {
if(obj != null) {
var s = JSON.stringify(obj);
Expand Down Expand Up @@ -320,12 +274,6 @@ function showKeyboard() {
keyman.refreshOskLayout();
}

function executePopupKey(keyID, keyText) {
// KMW only needs keyID to process the popup key. keyText merely logged to console
//window.console.log('executePopupKey('+keyID+'); keyText: ' + keyText);
keyman.executePopupKey(keyID, keyText);
}

// Cannot make it explicitly async / await on API 21.
function executeHardwareKeystroke(code, shift, lstates, eventModifiers) {
console_debug('executeHardwareKeystroke(code='+code+',shift='+shift+',lstates='+lstates+',eventModifiers='+eventModifiers+')');
Expand Down
111 changes: 0 additions & 111 deletions android/KMEA/app/src/main/java/com/keyman/engine/KMKeyPreviewView.java

This file was deleted.

Loading

0 comments on commit 250b8a6

Please sign in to comment.