Re: [Freedos-user] How to make the R-Alt key act like L-Alt?

2023-05-06 Thread Aitor SantamarĂ­a
Hello John,

Sorry for being late.

This can be tricky, but feasible with FD-KEYB without recompiling. You can
start from some US layout and try this example, for Alt+X

First, you need to find out the key and scancode that Alt+X produces (that
EDIT receives). I found this page, but there are utilities that may help
you out with this (like KEYCODE).

Keyboard scan codes (freepascal.org)


According to this, Alt+X returns scancode 2Dh  (45)

Define a plane for Left-Alt:

[Planes]
RALT

To emit simply a scancode with 0, you can do the / trick:

[KEYS:k1]
 45C  x  X   0/45

This should work.

Aitor


On Thu, 16 Jul 2015 at 02:48, John Hupp  wrote:

> I'm just using the BIOS keyboard driver (not running KEYB) with a US
> layout keyboard.
>
> What I'm trying to do: In Edit, for instance, R-Alt + F does not open
> the File menu, and R-Alt + X does not exit the program.  I want it to do
> those things just as L-Alt + F and L-Alt + X do, because those L-Alt key
> combinations are awkward for a touch typist.
>
> On 7/15/2015 8:35 PM, Rugxulo wrote:
> > Hi,
> >
> > I'm not 100% sure of what you're trying to do or why.
> >
> > On Wed, Jul 15, 2015 at 6:48 PM, John Hupp 
> wrote:
> >> For a US layout keyboard and the default BIOS keyboard driver: I brought
> >> this issue up a long time ago and learned that by design R-Alt is a dead
> >> key and does not duplicate the functionality of L-Alt.
> >>
> >> Today I have been studying xkeyb and keyb, trying to find a way to get
> >> what I wanted, but I have come up dry so far.
> > AFAIK, xkeyb is totally deprecated in lieu of KEYB. You could instead
> > use something minimal like mKEYB, but that's not obviously a full
> > replacement.
> >
> >> With keyb, documentation notes that one might edit a KEY file and use KC
> >> with that to compile a custom keyboard layout (KL) file to load, and I
> >> am now trying to plow through the KC doc files, but it's pretty dense
> >> reading.
> >>
> >> Can anyone detail or at least outline a solution?
> > So you have KEYB loaded? (dumb question) Do you need it?? Just unload
> > it, and don't worry about it. Or do you actually need it here for
> > foreign language input? What language(s)?
> >
> > IIRC, you can temporarily disable KEYB via Ctrl-Alt-F1 (and re-enable
> > via Ctrl-Alt-F2). Does that help?
> >
> >
> --
> > Don't Limit Your Business. Reach for the Cloud.
> > GigeNET's Cloud Solutions provide you with the tools and support that
> > you need to offload your IT needs and focus on growing your business.
> > Configured For All Businesses. Start Your Cloud Today.
> > https://www.gigenetcloud.com/
> > ___
> > Freedos-user mailing list
> > Freedos-user@lists.sourceforge.net
> > https://lists.sourceforge.net/lists/listinfo/freedos-user
>
>
>
> --
> Don't Limit Your Business. Reach for the Cloud.
> GigeNET's Cloud Solutions provide you with the tools and support that
> you need to offload your IT needs and focus on growing your business.
> Configured For All Businesses. Start Your Cloud Today.
> https://www.gigenetcloud.com/
> ___
> Freedos-user mailing list
> Freedos-user@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/freedos-user
>
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] How to make the R-Alt key act like L-Alt?

2015-07-16 Thread Tom Ehlert
Hallo Herr John Hupp,

am 16. Juli 2015 um 01:48 schrieben Sie:

 For a US layout keyboard and the default BIOS keyboard driver: I brought
 this issue up a long time ago and learned that by design R-Alt is a dead
 key and does not duplicate the functionality of L-Alt.

 I have always found it to be awkward, slow and displeasing to invent 
 some other finger usage to do an Alt-File or Alt-X, which are very 
 common key combinations.

 Today I have been studying xkeyb and keyb, trying to find a way to get
 what I wanted, but I have come up dry so far.

 With xkeyb, recent versions now support an extended scancode for R-Alt
 (E56), but L-Alt is 56, and the [Shifts] section of its US.KEY supports
 association of only one scancode with ALT, and by default that scancode
 is 56.  By contrast, [Shifts] has a Shift1 and Shift2 association, 
 thereby enabling both L-Shift and R-Shift to be identified as Shift keys.

 With keyb, documentation notes that one might edit a KEY file and use KC
 with that to compile a custom keyboard layout (KL) file to load, and I
 am now trying to plow through the KC doc files, but it's pretty dense 
 reading.

 Can anyone detail or at least outline a solution?

outline, without *any* warranties:

L-ALT sends scancode 0x38
R-ALT sends scancode 0xe0 0x38

the keyboard handler should :

   if scancode 0x38 is detected, clear 'extended' status
   in BIOS


locate MKEYB to modify (castrate)


replace
   int cdecl NAME(cint15_handler)(uchar scancode)
   {
   ...
   }

with


int cdecl NAME(cint15_handler)(uchar scancode)
{

debug_scancode = scancode;  /* very nice for debugging   */
/* hit ESC - and we are gone */

if (scancode == 0x38)
   {
   *(char far*)MK_FP(0x40, 0x96) =  ~0x02;
   }

return scancode;
}

compile and test

good luck ;)


Tom


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] How to make the R-Alt key act like L-Alt?

2015-07-16 Thread John Hupp
Thanks for indulging me.

I located the code in MKEYBR.C, and I downloaded Borland Turbo C++ from 
http://borlandc.org/download-turbo-c-3-0-for-windows-7-windows-8-and-windows-xp/,
 
but before I install it and learn whatever I would need to learn to 
recompile, let me ask if this can succeed for a US keyboard layout -- 
since there is no US key definition file for mkeyb?

And if the answer is that it won't work (without first writing a US key 
def file), then I'm back to wondering if I can accomplish this by 
editing keyb's US.KEY file.

On 7/16/2015 7:50 AM, Tom Ehlert wrote:
 Hallo Herr John Hupp,

 am 16. Juli 2015 um 01:48 schrieben Sie:

 For a US layout keyboard and the default BIOS keyboard driver: I brought
 this issue up a long time ago and learned that by design R-Alt is a dead
 key and does not duplicate the functionality of L-Alt.
 I have always found it to be awkward, slow and displeasing to invent
 some other finger usage to do an Alt-File or Alt-X, which are very
 common key combinations.
 Today I have been studying xkeyb and keyb, trying to find a way to get
 what I wanted, but I have come up dry so far.
 With xkeyb, recent versions now support an extended scancode for R-Alt
 (E56), but L-Alt is 56, and the [Shifts] section of its US.KEY supports
 association of only one scancode with ALT, and by default that scancode
 is 56.  By contrast, [Shifts] has a Shift1 and Shift2 association,
 thereby enabling both L-Shift and R-Shift to be identified as Shift keys.
 With keyb, documentation notes that one might edit a KEY file and use KC
 with that to compile a custom keyboard layout (KL) file to load, and I
 am now trying to plow through the KC doc files, but it's pretty dense
 reading.
 Can anyone detail or at least outline a solution?
 outline, without *any* warranties:

 L-ALT sends scancode 0x38
 R-ALT sends scancode 0xe0 0x38

 the keyboard handler should :

 if scancode 0x38 is detected, clear 'extended' status
 in BIOS


 locate MKEYB to modify (castrate)


 replace
 int cdecl NAME(cint15_handler)(uchar scancode)
 {
 ...
 }

 with


 int cdecl NAME(cint15_handler)(uchar scancode)
 {

  debug_scancode = scancode;  /* very nice for debugging   */
  /* hit ESC - and we are gone */

  if (scancode == 0x38)
 {
 *(char far*)MK_FP(0x40, 0x96) =  ~0x02;
 }

  return scancode;
 }

 compile and test

 good luck ;)


 Tom


 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Freedos-user mailing list
 Freedos-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/freedos-user


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] How to make the R-Alt key act like L-Alt?

2015-07-15 Thread Ralf Quint
On 7/15/2015 5:47 PM, John Hupp wrote:
 I'm just using the BIOS keyboard driver (not running KEYB) with a US
 layout keyboard.

 What I'm trying to do: In Edit, for instance, R-Alt + F does not open
 the File menu, and R-Alt + X does not exit the program.  I want it to do
 those things just as L-Alt + F and L-Alt + X do, because those L-Alt key
 combinations are awkward for a touch typist.

Do you actually have a keyboard with a right [Alt] key or do you have a 
keyboard that has instead an [AltGr]?
I suspect the later and in that case, there is nothing you can do, as 
that is a key that does not produce the scan code for the [Alt] key but 
instead is a special 'Gr'aphics key to type certain characters which 
are not part of the keyboard layout 
(https://en.wikipedia.org/wiki/AltGr_key)

Beside that, the scan codes for for the two [Alt] keys are (somewhat) 
different, with 00h 38h for the left [Alt] key and E0h 38h for the right 
[Alt] key.


Ralf

---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


[Freedos-user] How to make the R-Alt key act like L-Alt?

2015-07-15 Thread John Hupp
For a US layout keyboard and the default BIOS keyboard driver: I brought 
this issue up a long time ago and learned that by design R-Alt is a dead 
key and does not duplicate the functionality of L-Alt.

I have always found it to be awkward, slow and displeasing to invent 
some other finger usage to do an Alt-File or Alt-X, which are very 
common key combinations.

Today I have been studying xkeyb and keyb, trying to find a way to get 
what I wanted, but I have come up dry so far.

With xkeyb, recent versions now support an extended scancode for R-Alt 
(E56), but L-Alt is 56, and the [Shifts] section of its US.KEY supports 
association of only one scancode with ALT, and by default that scancode 
is 56.  By contrast, [Shifts] has a Shift1 and Shift2 association, 
thereby enabling both L-Shift and R-Shift to be identified as Shift keys.

With keyb, documentation notes that one might edit a KEY file and use KC 
with that to compile a custom keyboard layout (KL) file to load, and I 
am now trying to plow through the KC doc files, but it's pretty dense 
reading.

Can anyone detail or at least outline a solution?

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] How to make the R-Alt key act like L-Alt?

2015-07-15 Thread Rugxulo
Hi,

I'm not 100% sure of what you're trying to do or why.

On Wed, Jul 15, 2015 at 6:48 PM, John Hupp free...@prpcompany.com wrote:

 For a US layout keyboard and the default BIOS keyboard driver: I brought
 this issue up a long time ago and learned that by design R-Alt is a dead
 key and does not duplicate the functionality of L-Alt.

 Today I have been studying xkeyb and keyb, trying to find a way to get
 what I wanted, but I have come up dry so far.

AFAIK, xkeyb is totally deprecated in lieu of KEYB. You could instead
use something minimal like mKEYB, but that's not obviously a full
replacement.

 With keyb, documentation notes that one might edit a KEY file and use KC
 with that to compile a custom keyboard layout (KL) file to load, and I
 am now trying to plow through the KC doc files, but it's pretty dense
 reading.

 Can anyone detail or at least outline a solution?

So you have KEYB loaded? (dumb question) Do you need it?? Just unload
it, and don't worry about it. Or do you actually need it here for
foreign language input? What language(s)?

IIRC, you can temporarily disable KEYB via Ctrl-Alt-F1 (and re-enable
via Ctrl-Alt-F2). Does that help?

--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user


Re: [Freedos-user] How to make the R-Alt key act like L-Alt?

2015-07-15 Thread John Hupp
I'm just using the BIOS keyboard driver (not running KEYB) with a US 
layout keyboard.

What I'm trying to do: In Edit, for instance, R-Alt + F does not open 
the File menu, and R-Alt + X does not exit the program.  I want it to do 
those things just as L-Alt + F and L-Alt + X do, because those L-Alt key 
combinations are awkward for a touch typist.

On 7/15/2015 8:35 PM, Rugxulo wrote:
 Hi,

 I'm not 100% sure of what you're trying to do or why.

 On Wed, Jul 15, 2015 at 6:48 PM, John Hupp free...@prpcompany.com wrote:
 For a US layout keyboard and the default BIOS keyboard driver: I brought
 this issue up a long time ago and learned that by design R-Alt is a dead
 key and does not duplicate the functionality of L-Alt.

 Today I have been studying xkeyb and keyb, trying to find a way to get
 what I wanted, but I have come up dry so far.
 AFAIK, xkeyb is totally deprecated in lieu of KEYB. You could instead
 use something minimal like mKEYB, but that's not obviously a full
 replacement.

 With keyb, documentation notes that one might edit a KEY file and use KC
 with that to compile a custom keyboard layout (KL) file to load, and I
 am now trying to plow through the KC doc files, but it's pretty dense
 reading.

 Can anyone detail or at least outline a solution?
 So you have KEYB loaded? (dumb question) Do you need it?? Just unload
 it, and don't worry about it. Or do you actually need it here for
 foreign language input? What language(s)?

 IIRC, you can temporarily disable KEYB via Ctrl-Alt-F1 (and re-enable
 via Ctrl-Alt-F2). Does that help?

 --
 Don't Limit Your Business. Reach for the Cloud.
 GigeNET's Cloud Solutions provide you with the tools and support that
 you need to offload your IT needs and focus on growing your business.
 Configured For All Businesses. Start Your Cloud Today.
 https://www.gigenetcloud.com/
 ___
 Freedos-user mailing list
 Freedos-user@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/freedos-user


--
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
___
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user