diff --git a/web/source/text/engineDeviceSpec.ts b/web/source/text/engineDeviceSpec.ts
index 6ce11b77dd..1117546e7e 100644
--- a/web/source/text/engineDeviceSpec.ts
+++ b/web/source/text/engineDeviceSpec.ts
@@ -43,7 +43,7 @@ namespace com.keyman.text {
case Browser.Native:
case Browser.Opera:
case Browser.Safari:
- this.browser = browser as Browser;
+ this.browser = browser.toLowerCase() as Browser;
break;
default:
this.browser = Browser.Other;
@@ -53,10 +53,10 @@ namespace com.keyman.text {
case FormFactor.Desktop:
case FormFactor.Phone:
case FormFactor.Tablet:
- this.formFactor = formFactor as FormFactor;
+ this.formFactor = formFactor.toLowerCase() as FormFactor;
break;
default:
- throw ("Invalid form factor specified for device!");
+ throw ("Invalid form factor specified for device: " + formFactor);
}
switch(OS.toLowerCase()) {
@@ -65,7 +65,7 @@ namespace com.keyman.text {
case OperatingSystem.Linux.toLowerCase():
case OperatingSystem.Android.toLowerCase():
case OperatingSystem.iOS.toLowerCase():
- this.OS = OS as OperatingSystem;
+ this.OS = OS.toLowerCase() as OperatingSystem;
break;
default:
this.OS = OperatingSystem.Other;
diff --git a/web/source/text/processor.ts b/web/source/text/processor.ts
index cfbdeb8974..84cf7b70db 100644
--- a/web/source/text/processor.ts
+++ b/web/source/text/processor.ts
@@ -10,7 +10,7 @@
///
// Defines built-in keymapping.
///
-// Defines a headless-compatible 'Device' analogue for use in keyEvent processing
+// Defines a core-compatible 'Device' analogue for use in keyEvent processing
///
namespace com.keyman.text {