Wiki improvements

Forum for discussion about the documentation project.
Post Reply
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

These values (&h5B, &h5C, &h5D) appear in fbgfx.bi (instead of &h7D, &h7E, &h7F) from the fbc version 0.18.3b.

In the changelog.txt (version 0.18.3 beta), we find this fix:
- #1813104 - scancodes for SC_LWIN(&h5b), SC_RWIN(&h5c), SC_MENU(&h5d), are now same in both gfx/console modes and on all platforms (jeffm)

So it would seem that the documentation was not updated accordingly at the time!
coderJeff
Site Admin
Posts: 4323
Joined: Nov 04, 2005 14:23
Location: Ontario, Canada
Contact:

Re: Wiki improvements

Post by coderJeff »

Yes, wiki is wrong. Values were changed in 2007 and wiki never updated. inc/fbgfx.bi is correct.

Some explanation:

fb's scancodes come from legacy DOS use (which would have typically been the raw values returned by keyboard controller port &h60). The actual values used by the operating system (keyboard driver) probably won't match every value same as DOS. However, the intent is that from user's point of view, fbc's scancodes, both the symbolic name, and numeric value will work the same on all platforms where fbc is compiled. i.e. cross compatible code.

On linux & win can see private mappings between fbgfx's scancodes and the system's keycodes:
src/rtlib/linux/io_multikey.c
src/rtlib/win32/io_multikey.c

A user may find that for some keys, fb's scancodes won't match scancodes returned by direct system calls. I didn't check which ones are different, and I don't think it would be meaningful information for most users using MULTIKEY.
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Wiki improvements

Post by badidea »

I have updated the 3 scancodes on the wiki. I left the comment '' Extra scancodes not compatible with DOS scancodes untouched.
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

Thank you for that.
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Wiki improvements

Post by badidea »

I added an example to Bsave. I hope it is not too long (and free of errors).
Should I put the general description inside the code block?

I also noticed that the 'tag' {{fbdoc item="ex"}} is used twice on KeyPgPutfileio. Better to remove the second? Is it important?
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

Thank you.
badidea wrote:Should I put the general description inside the code block?
Everyone is free to document as he sees fit.
For my part, I usually put a title (if necessary) above the code box and a general description (if necessary) at the beginning of the code box.
badidea wrote:I also noticed that the 'tag' {{fbdoc item="ex"}} is used twice on KeyPgPutfileio. Better to remove the second? Is it important?
Yes, you can remove the redundant '{{fbdoc item="ex"}}' on the third example of 'PUT (File I/O)'.
A single paragraph "Examples" is better.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Wiki improvements

Post by dodicat »

Why I never use the wiki help:
If I go to Badidea's put page (KeyPgPutfileio) and say I wanted to view get, I put get into the search, it says no matches for get.
I am probably using the wiki help incorrectly, but I am not practised in it, I always use the .chm help file.
jj2007
Posts: 2326
Joined: Oct 23, 2016 15:28
Location: Roma, Italia
Contact:

Re: Wiki improvements

Post by jj2007 »

dodicat wrote:it says no matches for get
"By default, searches are limited to text strings greater than 4 characters". And I agree that this is a problem. My personal favourite help system is the old and terribly obsolete WinHelp32 btw. Clearly the best!
MrSwiss
Posts: 3910
Joined: Jun 02, 2013 9:27
Location: Switzerland

Re: Wiki improvements

Post by MrSwiss »

jj2007 wrote:"By default, searches are limited to text strings greater than 4 characters".
Not true any longer.
counting_pine changed that to 3 characters, recently ...
(this is in respect to forum search anyway, and not the wiki)
srvaldez
Posts: 3379
Joined: Sep 25, 2005 21:54

Re: Wiki improvements

Post by srvaldez »

@MrSwiss
I find the forum search at times totally useless, sometimes I need to resort to Google search instead.
dodicat
Posts: 7983
Joined: Jan 10, 2006 20:30
Location: Scotland

Re: Wiki improvements

Post by dodicat »

Yea, the forum search.
That is good now.
I also have the the win32.chm.
Also I use the pascal .chm files, but they are not well built, I mainly google for pascal help.
But I am definitely CHM people when help is needed (all the time in my case).
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

MrSwiss wrote:Not true any longer.
counting_pine changed that to 3 characters, recently ...
(this is in respect to forum search anyway, and not the wiki)
... and anyway, "get" is one of the common words that do not trigger any search on the forum.
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

dodicat wrote:Why I never use the wiki help:
..... , I always use the .chm help file.
Me too.
In general, I go on wiki only to make an update!
(Otherwise, I'm using the latest '.chm' version downloaded from http://users.freebasic-portal.de/stw/builds/)
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: Wiki improvements

Post by badidea »

fxm wrote:
dodicat wrote:Why I never use the wiki help:
..... , I always use the .chm help file.
Me too.
In general, I go on wiki only to make an update!
(Otherwise, I'm using the latest '.chm' version downloaded from http://users.freebasic-portal.de/stw/builds/)
Me neither (chm as well) , but the wiki is the source for the other formats right? So, a change on the wiki will find its way to the other formats, eventually.
fxm
Moderator
Posts: 12107
Joined: Apr 22, 2009 12:46
Location: Paris suburbs, FRANCE

Re: Wiki improvements

Post by fxm »

Such blocks (table of one column only):
[u]INSTRREV[/u] wrote:<<'A Unicode example:
dim text as wstring*20
text = "&#1055;&#1088;&#1080;&#1074;&#1077;&#1090;, &#1084;&#1080;&#1088;!"
print instrrev(text,"&#1077;&#1090;") ' displays 5
<<::c::
in order to display the following:
'A Unicode example:
dim text as wstring*20
text = "Привет, мир!"
print instrrev(text,"ет") ' displays 5
induce bad display (mainly bad location) when compiled to manual.chm.

Can we do some thing?
(same problem as Instrrev above for Asc, Wstring (Function), Right, Mid (Function), Left, Instr, Wchr)
Post Reply