topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Saturday December 14, 2024, 7:03 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: IDEA: Treo-like "Alt" key for Windows  (Read 40925 times)

supersocialist

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
IDEA: Treo-like "Alt" key for Windows
« on: December 10, 2006, 07:31 PM »
Windows has a really terrible interface for entering things like accents on letters. Because the mobile keyboards are so cramped, Palm came up with a pretty nice solution: the "alt" key pops a small window up near the cursor, allowing the user to replace the just-typed character with an alternative loaded from a table.

The window is a narrow column showing a number of alternatives for the previous key: various accents over vowels, for example. Selection starts at the top and each press selects the next one down. It loops an infinite number of times, and also accepts pointer selection. Space bar and enter select the currently-highlighted alt-character, and clicking outside or esc dismisses the window without replacing the character.

There are hacks to change the order on a Treo, so I know it'd be possible to dig those ones out, but a lot of them wouldn't be useful on a real keyboard. It'd be easier to read the table from a text file anyway. The user would only have to load charmap once to build the table.

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,914
    • View Profile
    • Mouser's Software Zone on DonationCoder.com
    • Read more about this member.
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #1 on: December 10, 2006, 09:18 PM »
i really like this idea of having it work based on previously typed key.. this definitely sounds like a coding snacks type thing.

Ruffnekk

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 332
  • Uhm yeah...
    • View Profile
    • RuffNekk's Crypto Pages
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #2 on: December 11, 2006, 12:58 AM »
I’m not an expert on this area, but I can tell you how my keyboard (Dutch layout) works. My keyboard doesn’t have any accented characters mapped on it, the layout is almost identical to the US one. But sometimes in Dutch you do need an accented character and the way you can quickly get it is by pressing one key and then another. For example, if I need an é I will type the ´ sign first and then the e. Typing the ´ sign doesn’t display it until I press another key. This also works for other symbols like ´, `, ¨, ~, ¸ and ^. Thus you can quickly type characters like é á ó í, è à ò ì, ë ä ö ï, ñ ã õ, ç and ê î â û ô. I think something like this is easier than a popup and I think it should be possible to have this working on US layout as well, since it’s something native to Windows for other keyboards. I’m just not sure yet which files or settings should be manipulated to enable it... I’ll look around to see if I can find it :)
Regards,
RuffNekk

Programming is an art form that fights back.

Ruffnekk

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 332
  • Uhm yeah...
    • View Profile
    • RuffNekk's Crypto Pages
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #3 on: December 11, 2006, 01:01 AM »
Okay I found it. You should use the United States International keyboard settings: http://support.microsoft.com/kb/306560
I hope it’s an option for you :)
Regards,
RuffNekk

Programming is an art form that fights back.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,205
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #4 on: December 11, 2006, 04:58 AM »
Don't forget the freeware AllChars for entering accented letters, and for text expansion.  -  Ruffnekk, it must be good, it's made in The Netherlands  :)


AllChars

AllChars provides a quick, easy-to-remember way of creating accents like é Ü ç î æ and special characters like ƒ ² ‰ © £ ± ß ° 1/2 ¿ « » ™ „ in most Windows programs.

AllChars emulates the *nix Compose key on Windows.

AllChars v3.5 upwards supports macros: type a (short) name and AllChars will replace it with a (long) text.

AllChars is very easy and intuitive in usage and it is possible to adapt it to your wishes.

AllChars is FREEWARE.

AllChars works with Windows 3.11 or Windows 95, 98, ME, NT 4.0 and 2000.


You can also find several extended character map applications, better than the one built into Windows.


supersocialist

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #5 on: December 11, 2006, 10:30 AM »
I'd still like to see the Treo-like app because I'm a stickler about keeping my interfaces consistant as possible, but allchars and the international keyboard layout both provide the same service. Thanks for the links, guys! I thought I was going to have to go to a Mac lab at school to get accents into Power Point!

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #6 on: December 11, 2006, 06:14 PM »
 :) Here's an alternative take on the problem.

Accents - Press a key three times or more to apply accents.

Features:

- Change accents using Settings in the tray menu
- Doesn't work properly with shifted keys while CapsLock is on

You'll find the downloads and more info at 1 Hour Software by Skrommel.

Skrommel

gregland

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 32
    • View Profile
    • L'Apirine du Web
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #7 on: December 11, 2006, 08:26 PM »
Juste a little error in the Web Page
http://img215.imageshack.us/img215/3074/tempimggg5.jpg
IDEA: Treo-like "Alt" key for Windows


Thanks for this 1hour app
GregLand
French WebMaster & Programmer
_______________________________________
WebSite
« Last Edit: December 16, 2006, 02:34 AM by gregland »

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #8 on: December 12, 2006, 01:53 AM »
 :-[ The Copy and Paste devil at work!

Skrommel

supersocialist

  • Participant
  • Joined in 2006
  • *
  • default avatar
  • Posts: 4
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #9 on: December 12, 2006, 11:07 PM »
That's awesome, skrommel! Just what I was looking for!

Hirudin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 543
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #10 on: April 17, 2007, 11:15 PM »
This is very cool!

First: a quick bug report type thing...
On my computer it kept "holding down" the left Shift key, even though the script should have exicuted "Shift Up". I'd have to physically press the left Shift key to make it stop turning my letters into capitals and my numbers into symbols.
I would imagine this is more a bug with AutoHotkey or maybe my computer (this bug actually seems to show up a lot on my comp...).

Can I make a suggestion or 5?

1. I think you should take it past accents. Include weird versions of charactors as well, like this letter "a": "ª"
Or in 32pt font: "a" (normal) "ª" (Alt + 166)

2. Also, include consenents too, like "ñ" (Alt 164), "Ñ" (165), "∩" (239) which all sorta look like "N"s. There's also a backward N somewhere in there...

Some of these symbols will complicate things unless you have seperate alt charactor lists for capitals and lower case. I figure alternate lists may also alleviate he bug I mentioned above...

3. Cater it for English-Speakers who ocationally want their writing to look wacky... What I mean is don't conform strictly to what letter is what, like a "ß" looks a lot like a "B" to me, even though it's a double-"s" in German (AFAIK). It also sorta looks like an "R" and maybe an "8".

Of course, in order to have this letter come up as an alternate for B, R, S, and 8 it'll have to be listed as a substitute for multiple letters. I think this is OK personally...

Another reason to have the same symbol in multiple alt-lists is for letters like "¥" which looks a lot like a "Y", but should also be included as an alternate for "$" (allong with "¢", "£", and the euro symbol (apparently unicode: U+20AC), and many more I'm sure...).

One thing I could see being a problem is inadvertantly entering in symbols. Expecially if the alt list includes alternates for numbers (ex. "²" instead of "2"). Maybe a different hot key/trigger is in order? Or maybe a hotkey to enable/disable the program, then it can pick up on the tripple-stroke only while it's active?

Would it be possible to format the Accents.ini file in a manor that enables easier editing?

I'm sorry I don't know if this is possible, but instead of having numbered entries with a "key" variable under them, maybe each entry could be diferentiated by the originating symbol? THEN, instead of a numbered list, just have a bunch of entries below, to fasilitate easier re-ordering...

So instead of the "a" entry looking like this:
[1]
key=a
1=å
2=ä
3=â
4=à
5=á
6=a

It would be something like this:
[a]
å
ä
â
à
á
ª
æ
a

Lastly, I'm willing to take the time to make an alt list, if it can be implimented. I don't want to start on the list until I get the go-ahead though...
Right now I keep * Symbols.txt (1.3 kB - downloaded 912 times.) in my quick launch toolbar, I'd like to replace it with something more dynamic than copying and pasting single charactors...

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #11 on: April 17, 2007, 11:26 PM »
nice idea there, Hirudin.. i have something similar here: Accents. it'd be fantastic if there are common templates for usage with this program.. :Thmbsup:

skrommel

  • Fastest code in the west
  • Developer
  • Joined in 2005
  • ***
  • Posts: 933
    • View Profile
    • 1 Hour Software by skrommel
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #12 on: April 18, 2007, 01:51 AM »
 :) I really should make help files, 'cause what you want is already possible.

Any AutoHotkey Send command can be used in Accents. Look at the example below. So to send a regular !, you actually have to put in `!, or else it is entepreted as an Alt.


[Settings]
delay=1

[1]
key=a
1={Alt Down}{NumPad1}{NumPad2}{NumPad3}{Alt Up}
2=ä
3=â
4=à
5=á
6=a


Here's the complete list of keys, stolen from AutoHotkey's help file:

List of Keys, Mouse Buttons, and Joystick Controls

--------------------------------------------------------------------------------

Mouse (mouse hotkeys require Windows NT/2000/XP or later)
LButton - the left mouse button
RButton - the right mouse button
MButton - the middle or wheel mouse button

WheelDown - this is equivalent to rotating the mouse wheel down (toward you)
WheelUp - the opposite of the above. When WheelDown/Up are used as hotkeys, A_EventInfo contains the number of turns/notches.

Supported only in Windows 2000/XP or later:
XButton1 - a button that appears only on certain mice
XButton2 - a button that appears only on certain mice

Keyboard
Note: The names of the letter and number keys are the same as that single letter or digit. For example: b is the "b" key and 5 is the "5" key.

Space - the spacebar
Tab
Enter (or Return)
Escape (or Esc)
Backspace (or BS)

Delete (or Del)
Insert (or Ins)
Home
End
PgUp
PgDn
Up
Down
Left
Right

ScrollLock
CapsLock
NumLock

NumpadDiv - the slash key
NumpadMult - the asterisk key
NumpadAdd - the plus key
NumpadSub - the minus key
NumpadEnter - the Enter key

The following keys are used when Numlock is OFF:
NumpadDel
NumpadIns
NumpadClear - same physical key as Numpad5 on most keyboards
NumpadUp
NumpadDown
NumpadLeft
NumpadRight
NumpadHome
NumpadEnd
NumpadPgUp
NumpadPgDn

The following keys are used when Numlock is ON:
Numpad0
Numpad1
Numpad2
Numpad3
Numpad4
Numpad5
Numpad6
Numpad7
Numpad8
Numpad9
NumpadDot - the decimal point (period) key

F1 through F24 - The 12 or more function keys at the top of most keyboards.

AppsKey - this is the key that invokes the right-click context menu.

LWin - the left windows key
RWin - the right windows key. Note: unlike Control/Alt/Shift, there is no generic/neutral "Win" key because the OS does not support it.
Control (or Ctrl)
Alt
Shift
Note: The hotkeys Shift::, Alt::, and Control:: fire upon release of the key unless they have the tilde prefix such as ~Alt::. By contrast, a specific left or right hotkey such as LAlt:: fires upon press-down.

Note: For the most part, these next 6 keys are not supported by Windows 95/98/Me. Use the above instead:
LControl (or LCtrl) - the left control key
RControl (or RCtrl) - the right control key
LShift
RShift
LAlt - the left Alt key
RAlt - Note: If your keyboard layout has AltGr instead of RAlt, you can probably use it as a hotkey prefix via <^>! as described here. In addition, "LControl & RAlt::" would make AltGr itself into a hotkey.

PrintScreen
CtrlBreak
Pause
Break -- Since this is synonymous with Pause, use ^CtrlBreak in hotkeys instead of ^Pause or ^Break.

Help - this probably doesn't exist on most keyboards. It's usually not the same as F1.
Sleep - note that the sleep key on some keyboards might not work with this.

The following exist only on Multimedia or Internet keyboards that have extra buttons or keys:
Browser_Back
Browser_Forward
Browser_Refresh
Browser_Stop
Browser_Search
Browser_Favorites
Browser_Home
Volume_Mute
Volume_Down
Volume_Up
Media_Next
Media_Prev
Media_Stop
Media_Play_Pause
Launch_Mail
Launch_Media
Launch_App1
Launch_App2

SCnnn (where nnn is the scan code of a key) - Recognizes unusual keys not mentioned above. See Special Keys for details.

VKnn (where nn is the hexadecimal virtual key code of a key) - Although this rarely-used method is supported in all versions, only in v1.0.38.02+ does it prevent certain types of hotkeys from requiring the keyboard hook. For example, the following hotkey does not use the keyboard hook, but as a side-effect it is triggered by pressing either Home or NumpadHome: ^VK24::MsgBox You pressed Home or NumpadHome while holding down Control.

Joystick
Joy1 through Joy32: The buttons of the joystick. To help determine the button numbers for your joystick, use this test script. Note that hotkey prefix symbols such as ^ (control) and + (shift) are not supported (though GetKeyState can be used as a substitute). Also note that the pressing of joystick buttons always "passes through" to the active window if that window is designed to detect the pressing of joystick buttons.

Although the following Joystick control names cannot be used as hotkeys, they can be used with GetKeyState:
JoyX, JoyY, and JoyZ: The X (horizontal), Y (vertical), and Z (altitude/depth) axes of the joystick.
JoyR: The rudder or 4th axis of the joystick.
JoyU and JoyV: The 5th and 6th axes of the joystick.
JoyPOV: The point-of-view (hat) control.
JoyName: The name of the joystick or its driver.
JoyButtons: The number of buttons supported by the joystick (not always accurate).
JoyAxes: The number of axes supported by the joystick.
JoyInfo: Provides a string consisting of zero or more of the following letters to indicate the joystick's capabilities: Z (has Z axis), R (has R axis), U (has U axis), V (has V axis), P (has POV control), D (the POV control has a limited number of discrete/distinct settings), C (the POV control is continous/fine). Example string: ZRUVPD

Multiple Joysticks: If the computer has more than one and you want to use one beyond the first, include the joystick number in front of the control name. For example, 2joy1 is the second joystick's first button.

Note: If you have trouble getting a script to recognize your joystick, one person reported needing to specify a joystick number other than 1 even though only a single joystick was present. It is unclear how this situation arises or whether it is normal, but experimenting with the joystick number in the joystick test script can help determine if this applies to your system.

See Also:
Joystick remapping: methods of sending keystrokes and mouse clicks with a joystick.
Joystick-To-Mouse script: using a joystick as a mouse.

Hand-held Remote Controls
Respond to signals from hand-held remote controls via the WinLIRC client script.

Special Keys
If your keyboard or mouse has a key not listed above, you might still be able to make it a hotkey by using the following steps (requires Windows XP/2000/NT or later):

Ensure that at least one script is running that is using the keyboard hook. You can tell if a script has the keyboard hook by opening its main window and selecting "View->Key history" from the menu bar.
Double-click that script's tray icon to open its main window.
Press one of the "mystery keys" on your keyboard.
Select the menu item "View->Key history"
Scroll down to the bottom of the page. Somewhere near the bottom are the key-down and key-up events for your key. NOTE: Some keys do not generate events and thus will not be visible here. If this is the case, you cannot directly make that particular key a hotkey because your keyboard driver or hardware handles it at a level too low for AutoHotkey to access. For possible solutions, see further below.
If your key is detectible, make a note of the 3-digit hexadecimal value in the second column of the list (e.g. 159).
To define this key as a hotkey, follow this example:
SC159:: ; Replace 159 with your key's value.
MsgBox, %A_ThisHotKey% was pressed.
returnReverse direction: To remap some other key to become a "mystery key", follow this example:

; Replace 159 with the value discovered above. Replace FF (if needed) with the
; key's virtual key, which can be discovered in the first column of the Key History screen.
#c::Send {vkFFsc159}


Skrommel

Hirudin

  • Charter Member
  • Joined in 2005
  • ***
  • Posts: 543
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #13 on: April 18, 2007, 12:09 PM »
I tried to put in a capital "A" entry, but it used the alt keys for both "A" and "a".

Is it possible to force this to be case sensitive?

The reason I ask, is I think it'd be better to have "Ð" as an alternate for "D" but not for "d" (I don't think there's a lower case form of "Ð").

About the format change to the .ini...
If I start with
[>]


»

>
but then decided that I'd prefer the greater than or equal symbol (≥) to come up as the first alternate charactor, it would be very easy to change, just cut it from the bottom of the list, insert a line break, and paste it on the top of the list...
If each entry is numbered you'd have to change like this...
1=►        4=≥        1=≥
2=→        1=►        2=►
3=»   to   2=→   to   3=→
4=≥        3=»        4=»
5=>        5=>        5=>
which is much more tedious...

Same for each set of entries, if they're numbered, inserting a charactor between number 1 and 2 will require changing every entry that follows (6 to 7, 5 to 6, 4 to 5, 3 to 4, and 2 to 3). Not that bad if you're adding the 7th, but would be very very annoying if you were adding the 50th.
Sure, you could just add the 7th entry to the bottom, instead of into the middle. But if you have an "A" entry, and an "E" entry, it's just logical to put a "C" entry inbetween, not at the end. If you had 50 different entries, finding specific entries would be dificult unless they were sorted from the beginning.

So, I guess the biggest programming change I'm looking for is how the .ini file is interpreted. I think my method will take a little extra parsing, but will make editing the .ini easier.
The second thing, is make it so it's case sensitive (which doesn't seem to be the case right now).

So, I'll make a huge alt-charactor list, if there's something I can put that list into...

Lets see, I'll need an: `
before !, `, and ;
do you know of anything else? Maybe , ?
« Last Edit: April 18, 2007, 12:48 PM by Hirudin »

mtp

  • Participant
  • Joined in 2005
  • *
  • Posts: 31
    • View Profile
    • freewarewiki.de
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #14 on: January 31, 2008, 08:02 AM »
just to let you know avast reports Accents to be a trojan horse "Win32:Agent-QYH [trj]" ...
freewarewiki.de .. though it's not a wiki ...

PhilB66

  • Supporting Member
  • Joined in 2007
  • **
  • Posts: 1,522
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #15 on: January 31, 2008, 08:25 AM »
just to let you know avast reports Accents to be a trojan horse "Win32:Agent-QYH [trj]" ...

See this thread for a similar complaint.

Avast warns about this trojan being found in in every AutoHotkey script.  :down:

lanux128

  • Global Moderator
  • Joined in 2005
  • *****
  • Posts: 6,277
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #16 on: January 31, 2008, 10:29 AM »
not only Avast but AVG also. this thread has a temporary work-around..

https://www.donation...ex.php?topic=11859.0

NightFlyer

  • Participant
  • Joined in 2006
  • *
  • Posts: 9
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #17 on: September 19, 2010, 04:18 AM »
I know this is an old thread but I only just ran into a small problem with 'Accents' and was wondering if maybe a feature could be added to add 'Disable' to the right click menu, I play a few games where you have to hold down keys and if it happens to be say the 'e' key then accents kicks in and the key doesn't work in the game.

rjbull

  • Charter Member
  • Joined in 2005
  • ***
  • default avatar
  • Posts: 3,205
    • View Profile
    • Donate to Member
Re: IDEA: Treo-like "Alt" key for Windows
« Reply #18 on: September 19, 2010, 10:59 AM »
I don't think there's a lower case form of "Ð"

I think it's "ð"  It's Icelandic, one of their "th" sounds.

Blowing it up a bit: ð