There was an error while loading. Please reload this page.
1 parent 5c9581d commit 3ca521cCopy full SHA for 3ca521c
src/Graphics/UI/FLTK/LowLevel/Fl_Enumerations.chs
@@ -314,6 +314,7 @@ enum SpecialKey {
314
Kb_Refresh = FL_Refresh,
315
Kb_Sleep = FL_Sleep,
316
Kb_Favorites = FL_Favorites,
317
+ Kb_Unrecognized,
318
};
319
enum MouseButton {
320
Mouse_Left = FL_LEFT_MOUSE,
src/Graphics/UI/FLTK/LowLevel/Utils.hs
@@ -311,7 +311,9 @@ cToKeyType cint =
311
in
312
case findSpecialKey of
313
Just sk -> SpecialKeyType sk
- Nothing -> NormalKeyType (toEnum $ fromIntegral cint)
+ Nothing -> if cint <= 0x10FFFF
+ then NormalKeyType (toEnum $ fromIntegral cint)
+ else SpecialKeyType Kb_Unrecognized
cFromKeyType :: KeyType -> CInt
cFromKeyType kt = case kt of
0 commit comments