In article <
67c057d1-b11a-4551...@googlegroups.com>,
I still don't fully understand. I tried telling my Mac that I have a French
keyboard, and it didn't seem to do anything. One thing that would be helpful
would be if you could modify KEGS 1.08 to add some debug printfs to
MainView.swift. Here's the current function:
override func keyDown(with event: NSEvent) {
let keycode = event.keyCode
let is_repeat = event.isARepeat;
// print(".keyDown code: \(keycode), repeat: \(is_repeat)")
if(is_repeat) {
// If we do CMD-E, then we never get a down for the E,
// but we will get repeat events for that E. Let's
// ignore those
return
}
adb_physical_key_update(kimage_ptr, Int32(keycode), 0,
Int32(current_flags & is_shift),
Int32(current_flags & is_control),
Int32(current_flags & is_capslock))
}
I'd like you to uncomment the print, and add a few lines:
override func keyDown(with event: NSEvent) {
let keycode = event.keyCode
let is_repeat = event.isARepeat;
print(".keyDown code: \(keycode), repeat: \(is_repeat)")
if let str = event.characters {
print(" str: \(str)")
}
if(is_repeat) {
// If we do CMD-E, then we never get a down for the E,
// but we will get repeat events for that E. Let's
// ignore those
return
}
...
Just uncomment the print() and add the 3 lines for the if / print / }.
Do make.
Then run KEGS from the Terminal as:
./KEGSMAC.app/Contents/MacOS/KEGSMAC
and press some keys. Then post the output (or email it to me). Tell me what
keys you were pressing (if the str: doesn't match or looks like gibberish).
Include some function keys, backspace, delete, and other keys only available
by pressing shift: % * { >, return, etc.
I think I've completely misunderstood how keycodes work. Rather than
mucking about with this complexity, I'm tempted to virtualize keycodes:
press whatever key you want on your keyboard, and KEGS will translate it
to US Standard keycodes, so all code running on the IIgs will always see
the US standard keyboard codes. Would this work for you? So if you press
'A', KEGS would then always act like you pressed keycode=00 and an A will
appear.
Does the same problem happen on X11? I would think it would not, but I'm
not sure.
Kent