Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Readers > Amazon Kindle > Kindle Developer's Corner

Notices

Reply
 
Thread Tools Search this Thread
Old 03-21-2013, 05:53 PM   #1
yaschwartz
Junior Member
yaschwartz began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2013
Device: Kindle 4
Adjust ONLY right or left margin

Hi,

I'm new to the forum. Recently my Kindle 4th gen developed a crack in the screen in the bottom right hand corner, making it impossible to read. What I'd like to do is increase the right margin, while decreasing the left margin - in essence shift the entirety of the test to the left.

Is this possible? I know I can change the horizontal margin for both sides, but that only allows me to make them the same size.

Thanks,
A
yaschwartz is offline   Reply With Quote
Old 03-21-2013, 06:42 PM   #2
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
kindle 4 huh...

I seem to recall Geekmaster had developed a solution that moved the whole thing up or down a bit... for the Kindle 3... perhaps that could be adapted.

EDIT: Here... http://www.mobileread.com/forums/sho...d.php?t=158589

and the fixed up build of it by me here... http://www.mobileread.com/forums/sho...8&postcount=13

Would need adapting I guess. that in your skills range?

Last edited by twobob; 03-21-2013 at 06:54 PM.
twobob is offline   Reply With Quote
Old 03-22-2013, 12:08 AM   #3
yaschwartz
Junior Member
yaschwartz began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2013
Device: Kindle 4
Quote:
Originally Posted by twobob View Post
kindle 4 huh...

I seem to recall Geekmaster had developed a solution that moved the whole thing up or down a bit... for the Kindle 3... perhaps that could be adapted.

EDIT: Here... http://www.mobileread.com/forums/sho...d.php?t=158589

and the fixed up build of it by me here... http://www.mobileread.com/forums/sho...8&postcount=13

Would need adapting I guess. that in your skills range?
I'm pretty new to this. My coding is limited to basic java, VBA, and SQL. So I may need some walkthrough help to get where I need to be.

Thanks.
yaschwartz is offline   Reply With Quote
Old 03-22-2013, 03:07 AM   #4
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
well.. that's better than "Level 0"

I did (of course) have a quick look at the code...


The good news? there isn't much of it.


The bad news? IIRC the framebuffer is a tiny bit different on the 4... and it's in c... and the FB is one of the things I never got my head around yet....

but assuming it works like I THINK it works... it's a collection of of lines of X (width * the bit size) * Y height. That sound right?

And I also suck so badly at c it's not funny...

The code is below.

Happy to hack on it with you. Others may jump in.

the actual compilation is the easy part. TCC or simply a premade Toolchain can both do the job. (2007q3 is not a bad choice if you want that option or you could try the 2012.03 also)

So.... Here's the code.

Spoiler:
PHP Code:
// scroll.c - simple framebuffer scroller for kindle with (partially)
//            broken eink display
//
// usage:
//    scroll [percent] [type]
//
// percent: optional percent of display height to scroll (0 to 100, default = 10).
// type : optional display update type (value 0 to 2, default = 1):
//    0 = no flash (fast, but slight ghosting)
//    1 = quality (full flash update, cleanest display)
//    2 = speed (very fast, black and white only)
//
// *** Disclaimers and whatnot:
//
// This is just a simple quick-and-dirty hack.
// It could use some error checking, and more features.
//
// There is no "secret sauce" here (such as intellectual "Property",
// whatever that is), nothing to protect, no license needed.
//
// As always, please do not sue me if you poke your eye out with
// this code, or somehow manage to injure your brain or otherwise
// maim yourself, your stuff, or your loved ones with it.
//
// Enjoy, compliments of geekmaster...
//
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <linux/fb.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/ioctl.h>

#define FB_UPDATE_AREA 0x46dd

int main(int argcchar** argv) {
    
int pct 10;
    
int fx 1// full flash update
    
int yheightwidthwidth_bytesfb_bytes;
    
struct fb_var_screeninfo screeninfo;
    
unsigned char *pfb NULL, *psave NULL;
    
struct update_area_t
    
{
        
int x1y1x2y2fx;
        
__u8 *buffer;
    } 
ua;

    
// get optional command-line params
    
if (argc 1pct atoi(argv[1]);  // scroll percent (0-100)
    
if (argc 2fx atoi(argv[2]);   // update type (0-2)

    // open framebuffer and get screen size (assume 4 bpp)
    
int fdFB open("/dev/fb0"O_RDWR);
    
ioctl(fdFBFBIOGET_VSCREENINFO, &screeninfo);
    
height screeninfo.yres;
    
width screeninfo.xres;
    
width_bytes width 2;
    
fb_bytes height width_bytes;

    
// map and copy framebuffer
    
pfb = (unsigned char*)mmap(0fb_bytesPROT_READ|PROT_WRITE,
        
MAP_SHAREDfdFB0);
    
psave malloc(fb_bytes);
    
memcpy(psavepfbfb_bytes);

    
// copy swapped slices back to framebuffer
    
height pct 100;
    
memcpy(pfb width_bytespsave, (height y) * width_bytes);
    
memcpy(pfbpsave + (height y) * width_byteswidth_bytes);

    
// trigger framebuffer update
    
ua.x1 0;
    
ua.y1 0;
    
ua.x2 width;
    
ua.y2 height;
    
ua.buffer NULL;
    
ua.fx fx;  // update type
    
ioctl(fdFBFB_UPDATE_AREA, &ua);

    
// cleanup
    
free (psave);
    
munmap(pfbfb_bytes);
    
close(fdFB);



so....

Step one I guess would be to throw this on a 4 and see what breaks...

OKAY... That was a shock... it just "worked" LOL! Vertically though.. not L -> R

Step two... figure out HOW the fb if different

Let me go remember how you get that info

EDIT:

ah yeah

[root@kindle root]# cat /sys/class/graphics/fb0/ (presses tab and...)
Code:
/sys/class/graphics/fb0/bits_per_pixel  /sys/class/graphics/fb0/pan
/sys/class/graphics/fb0/blank           /sys/class/graphics/fb0/power/
/sys/class/graphics/fb0/console         /sys/class/graphics/fb0/rotate
/sys/class/graphics/fb0/cursor          /sys/class/graphics/fb0/state
/sys/class/graphics/fb0/dev             /sys/class/graphics/fb0/stride
/sys/class/graphics/fb0/device/         /sys/class/graphics/fb0/subsystem/
/sys/class/graphics/fb0/mode            /sys/class/graphics/fb0/uevent
/sys/class/graphics/fb0/modes           /sys/class/graphics/fb0/virtual_size
/sys/class/graphics/fb0/name
so we have to just cat some of those values to check our facts...

Last edited by twobob; 03-22-2013 at 05:28 PM. Reason: added links to tools
twobob is offline   Reply With Quote
Old 03-22-2013, 03:14 AM   #5
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
hmm... okay here are the differences


Unlike K3 and older which default to 4 bits/pixel, the new K4 and Touch use 8 bits/pixel.

Where the K3 and earlier 6-inch screen models used 300 bytes/row in 600x800 portrait mode, the K4 uses 600 bytes/row


K4 (non-touch):
Spoiler:

Quote:
finfo:
id=eink_fb
smem_start=d0b8e000
smem_len=966656
type=0
type_aux=0
visual=5
xpanstep=0
ypanstep=0
ywrapstep=0
line_length=600
mmio_start=00000000
mmio_len=0
accel=0

vinfo:
xres=600
yres=800
xres_virt=600
yres_virt=800
xoffset=0
yoffset=0
bitsperpixel=8
grayscale=1
nonstd=0
activate=2
height=121
width=91
flags=0
pixclk=0
lmargin=0
rmargin=0
umargin=0
bmargin=0
hsync_len=0
vsync_len=0
sync=0
vmode=0

K3 (Keyboard):
Spoiler:

Quote:
finfo:
id=eink_fb
smem_start=d08a8000
smem_len=483328
type=0
type_aux=0
visual=5
xpanstep=0
ypanstep=0
ywrapstep=0
line_length=300
mmio_start=00000000
mmio_len=0
accel=0

vinfo:
xres=600
yres=800
xres_virt=600
yres_virt=800
xoffset=0
yoffset=0
bitsperpixel=4
grayscale=1
nonstd=0
activate=2
height=121
width=91
flags=0
pixclk=0
lmargin=0
rmargin=0
umargin=0
bmargin=0
hsync_len=0
vsync_len=0
sync=0
vmode=0
rotate=0


Let me go check that on my 4 and 3.

Last edited by twobob; 03-22-2013 at 03:22 AM.
twobob is offline   Reply With Quote
Old 03-22-2013, 03:21 AM   #6
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
so...

/sys/class/graphics/fb0/stride gives us our X width (I think...)

on the 3

[root@kindle root]# cat /sys/class/graphics/fb0/stride
300

on the 4

[root@kindle root]# cat /sys/class/graphics/fb0/stride
600

So that looks right anyways...

I guess at this point we either have to choose to shift everything Left by stepping "so many to the right" and copying them "So many to the left..." and just forget about the bit on the right... or actually "wrap around" values like on an old broken TV...

Let's have a look back up at how GM was doing that...

Oh! and it's 8 bits per pixel. Now IIRC Hawhill said on the Kindle 4 that the lower 4 bits are just copied into the upper 4 bits... so we need to see if there is any "nibble" switching that we need to fiddle with at some point too... (I think that is what he called it)

EDIT. meh no I dont think so... just be careful to step in the correct increments I guess.

Last edited by twobob; 03-22-2013 at 04:26 AM.
twobob is offline   Reply With Quote
Old 03-22-2013, 04:03 AM   #7
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Code:
    // copy swapped slices back to framebuffer
    y = height * pct / 100;
    memcpy(pfb + y * width_bytes, psave, (height - y) * width_bytes);
    memcpy(pfb, psave + (height - y) * width_bytes, y * width_bytes);
so... we want to do something similar but on the X axis I guess?

So there you go... two lines to figure out what to do with...

EDIT: I already did the work and shoved some cherries on top. look below

Last edited by twobob; 03-22-2013 at 12:37 PM.
twobob is offline   Reply With Quote
Old 03-22-2013, 04:33 AM   #8
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I guess we could make each line part of a list? but there is no EASY for-each...
http://stackoverflow.com/questions/4...loop-construct
but ^-- There is a solution to that.

Or we could grab each line of width_bytes? and just mungle the end over the beginning? (If the locations overlap there was some detail about needing memmove rather than memcopy)
http://stackoverflow.com/questions/4...cpy-vs-memmove

I'm not really awake yet. perhaps something will occur when I am.
twobob is offline   Reply With Quote
Old 03-22-2013, 05:22 AM   #9
HarryT
eBook Enthusiast
HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.HarryT ought to be getting tired of karma fortunes by now.
 
HarryT's Avatar
 
Posts: 65,497
Karma: 43957509
Join Date: Nov 2006
Location: UK
Device: Kindle Voyage, iPad Mini, iPhone 4, MS Surface Pro, N7
It's probably an awful lot easier to use the "Tweak Book" facility in Calibre to increase the width of the right margin.
HarryT is offline   Reply With Quote
Old 03-22-2013, 05:57 AM   #10
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Quote:
Originally Posted by HarryT View Post
It's probably an awful lot easier to use the "Tweak Book" facility in Calibre to increase the width of the right margin.
Agreed. http://www.mobileread.com/forums/sho...d.php?t=185452

"Tweak Book. Use the calibre feature Tweak Book to explode an unfixed format. Fix any problems in the relevant files with any HyperText Markup Language (HTML) editor. Then in Tweak Book preview the results and subsequently cancel or commit the changes. This method requires knowledge of format structure, HTML, Cascading Style Sheets (CSS), and regular expressions. I am not skilled or knowledgable enough for successful use of Tweak Book."


and... http://manual.calibre-ebook.com/cli/calibre-debug.html

Cavets: But would need to be applied to each book... and so much less fun.

Last edited by twobob; 03-22-2013 at 06:21 AM.
twobob is offline   Reply With Quote
Old 03-22-2013, 07:30 AM   #11
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
Spoiler:
PHP Code:
// scroll.c - simple framebuffer scroller for kindle with (partially)
//            broken eink display
//
// usage:
//    scroll [percent] [type]
//
// percent: optional percent of display height to scroll (0 to 100, default = 10).
// type : optional display update type (value 0 to 2, default = 1):
//    0 = no flash (fast, but slight ghosting)
//    1 = quality (full flash update, cleanest display)
//    2 = speed (very fast, black and white only)
//
// *** Disclaimers and whatnot:
//
// This is just a simple quick-and-dirty hack.
// It could use some error checking, and more features.
//
// There is no "secret sauce" here (such as intellectual "Property",
// whatever that is), nothing to protect, no license needed.
//
// As always, please do not sue me if you poke your eye out with
// this code, or somehow manage to injure your brain or otherwise
// maim yourself, your stuff, or your loved ones with it.
//
// Enjoy, compliments of geekmaster... and twobob! ;)
//
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <linux/fb.h>
#include <string.h>
#include <sys/mman.h>
#include <sys/ioctl.h>

#define FB_UPDATE_AREA 0x46dd

int main(int argcchar** argv) {
    
int pct 5// 5% default
    
int fx 1// full flash update
    
int isx 1// x default  - set argv 3 to invoke Y operation
    
int counter =0// our counter thingies
    
int debug =0// our debug thingies
    
__u8 bpp=0;
    
int yxheightwidthwidth_bytesfb_bytes;
    
struct fb_var_screeninfo screeninfo;
    
unsigned char *pfb NULL, *psave NULL;
    
struct update_area_t
    
{
        
int x1y1x2y2fx;
        
__u8 *buffer;
    } 
ua;

    
// get optional command-line params
    
if (argc 1pct atoi(argv[1]);  // scroll percent (0-100)
    
if (argc 2fx atoi(argv[2]);   // update type (0-2)
    
if (argc 3isx atoi(argv[2]);    // make it X/Y/Debug configurable 0 = X, 1 = Y
    
if (argc 4debug 1;   // Setting the 4th arg enables debug output

    // open framebuffer and get screen size (assume 4 bpp)
    
int fdFB open("/dev/fb0"O_RDWR);
    
ioctl(fdFBFBIOGET_VSCREENINFO, &screeninfo);
    
height screeninfo.yres;
    
width screeninfo.xres;
    
bpp screeninfo.bits_per_pixel;

if (
debug == 1)
{
     
printf("bpp is - %d\n",bpp);
    
printf("height is - %d\n",height);
    
printf("width is - %d\n",width);
}

    if (
bpp == width_bytes width 2;
    if (
bpp == width_bytes width ;

    
fb_bytes height width_bytes;

    
// map and copy framebuffer
    
pfb = (unsigned char*)mmap(0fb_bytesPROT_READ|PROT_WRITEMAP_SHAREDfdFB0);
    
psave malloc(fb_bytes);
    
memcpy(psavepfbfb_bytes);

    
// copy swapped slices back to framebuffer
    
height pct 100;
    
width_bytes pct 100

    if (
isx == 1)
{
     while ( 
counter fb_bytes )
             {
            
memcpy(pfb counterpsave counter xwidth_bytes);
            
counter += width_bytes;
            }
}
    else
            {
               
memcpy(pfb width_bytespsave, (height y) * width_bytes);
            
memcpy(pfbpsave + (height y) * width_byteswidth_bytes);
            }

    
// trigger framebuffer update
    
ua.x1 0;
    
ua.y1 0;
    
ua.x2 width;
    
ua.y2 height;
    
ua.buffer NULL;
    
ua.fx fx;  // update type
    
ioctl(fdFBFB_UPDATE_AREA, &ua);

    
// cleanup
    
free (psave);
    
munmap(pfbfb_bytes);
    
close(fdFB);



That should do it...

EDIT: I re-factored it to:
SETTING ARG1: scroll percent (-100->100) (will go in reverse) 5% default
SETTING ARG2: update type (0-2)

0 = no flash (fast, but slight ghosting)
1 = quality (full flash update, cleanest display) <- Default
2 = speed (very fast, black and white only)

SETTING ARG4: support debug output
SETTING ARG3: 0= X 1=Y (move in that axis) X is Default

Now should auto-detect 4 or 8 bits per pixel.

Will now ¨just work¨ on a 3 or a 4.

Last edited by twobob; 03-29-2013 at 12:22 PM. Reason: updates , logic was wrong
twobob is offline   Reply With Quote
Old 03-22-2013, 07:52 AM   #12
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
[root@kindle root]# waitforkey
104 1 (Left Page Forward)
191 1 (Right Page forward)
193 1 (Left Page Back)
109 1 (Right Page Back)

I think I will try to make it so the RIGHT HAND SIDE auto scroll 5% left.
Need to figure out what to monitor to do that...

EDIT: I came up with this... I'll wrap it in a toggle...

while :; do SCROLL=0; usleep 10000; OUTY=$(waitforkey | awk '{print substr($0,0,3)}'); if [ "$OUTY" == "191" ] ; then SCROLL=1; fi ;if [ "$OUTY" == "109" ] ; then SCROLL=1; fi ; if [ "$SCROLL" == "1" ] ; then usleep 50000; echo $SCROLL ; fi ; done

Last edited by twobob; 03-22-2013 at 04:41 PM.
twobob is offline   Reply With Quote
Old 03-22-2013, 09:24 AM   #13
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
okay that works... need to just check why I occasionally get an extra log hit...

EDIT: Meh. That should do it I think.

Ill finish up the full script. Create a kual toggle button and publish it.

Last edited by twobob; 03-22-2013 at 11:00 AM.
twobob is offline   Reply With Quote
Old 03-22-2013, 03:39 PM   #14
yaschwartz
Junior Member
yaschwartz began at the beginning.
 
Posts: 4
Karma: 10
Join Date: Mar 2013
Device: Kindle 4
Quote:
Originally Posted by twobob View Post
okay that works... need to just check why I occasionally get an extra log hit...

EDIT: Meh. That should do it I think.

Ill finish up the full script. Create a kual toggle button and publish it.
Whoa mama. That's a lot of detail. Thanks!

I'm very much a newbie here. Is it possible for someone to help walk me through how I would get started with this. I've never jailbroken a kindle or anything like that and I'm at a loss for where to even start.
yaschwartz is offline   Reply With Quote
Old 03-22-2013, 04:42 PM   #15
twobob
( ͡° ͜ʖ ͡°){ʇlnɐɟ ƃǝs}Tır
twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.twobob ought to be getting tired of karma fortunes by now.
 
twobob's Avatar
 
Posts: 6,552
Karma: 6021146
Join Date: Jun 2012
Location: uti gratia usura (Yao ying da ying; Mo ying da yieng)
Device: PW-WIFI|K5-3G+WIFI| K4|K3-3G|DXG|K2| Rooted Nook Touch
I've finished.

Install KUAL.

Toggle button that "just works" on 3 or 4 devices with configurable direction coming up.


Future reader: thing is here: http://www.mobileread.com/forums/sho...2&postcount=31

Last edited by twobob; 03-22-2013 at 05:29 PM.
twobob is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reducing left-margin indent Siavahda ePub 1 02-10-2013 01:40 PM
Extra large left margin? peartree Amazon Kindle 5 02-23-2012 01:01 PM
Classic Any way to change left-right margin spacing? tanzer21 Barnes & Noble NOOK 7 02-14-2011 05:38 AM
left margin again gigapackiii Sigil 3 01-27-2011 12:55 PM
2 cm left margin jtarnvik Calibre 16 12-07-2010 04:28 AM


All times are GMT -4. The time now is 05:23 AM.


MobileRead.com is a privately owned, operated and funded community.